Read time reduction info from reduction_transient operation variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_reduction_transient_config_type), | intent(out) | :: | me |
time reduction |
||
type(flu_State), | intent(inout) | :: | conf |
handle for lua file |
||
integer, | intent(in) | :: | parent |
operation table handle |
subroutine tem_reduction_transient_load( me, conf, parent )
! -------------------------------------------------------------------- !
!> time reduction
type(tem_reduction_transient_config_type), intent(out) :: me
!> handle for lua file
type(flu_State), intent(inout) :: conf
!> operation table handle
integer, intent(in) :: parent
! -------------------------------------------------------------------- !
integer :: iError, reduce_handle
! -------------------------------------------------------------------- !
write(logUnit(10),*) 'Loading reduction transient'
call aot_table_open( L = conf, &
& thandle = reduce_handle, &
& parent = parent, &
& key = 'reduction_transient' )
call aot_get_val( L = conf, &
& thandle = reduce_handle, &
& val = me%nRecord, &
& ErrCode = iError, &
& key = "nrecord" )
if (btest(iError, aoterr_Fatal)) then
write(logUnit(1),*)'FATAL Error occured, while retrieving nRecord:'
if (btest(iError, aoterr_NonExistent)) &
& write(logUnit(1),*)'Variable not existent!'
if (btest(iError, aoterr_WrongType)) &
& write(logUnit(1),*)'Variable has wrong type!'
write(logUnit(1),*)'STOPPING'
call tem_abort()
end if
call aot_get_val( L = conf, &
& thandle = reduce_handle, &
& val = me%reduceType, &
& ErrCode = iError, &
& default = 'average', &
& key = "kind" )
write(logUnit(10),*) 'Reduction type: '//trim(me%reduceType)
write(logUnit(10),*) 'nIter to record: ', me%nRecord
call aot_table_close(L=conf, thandle=reduce_handle)
end subroutine tem_reduction_transient_load