Initialize, Verify and Finalize
The workflow in some user options may require initialization, verify during the run and finalize tasks in the Engine.
- Initialization is accomplished before the time step loop.
- Check/verification is accomplished during the time step loop / Enables to force Radioss to exit properly
- Finalization is accomplished at the end, before Radioss exits
#ifdef
” and
“!DEC$
” pre-compilation directives are mandatory for
Windows compatibility. Do not remove them; otherwise, the routine will not be
found by Radioss Engine.Initialization
CALL ENGINE_USER_INITIALIZE( NSPMD, NTHREAD, MY_RANK)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_INITIALIZE" :: ENGINE_USER_INITIALIZE
!DEC$ ATTRIBUTES REFERENCE :: NSPMD, NTHREAD,MY_RANK
#endif
LINE
- Character string with the message.
NSPMD
- Number of MPI domains in the Radioss job.
NTHREAD
- Number of SMP domains in the Radioss job.
MY_RANK
- Domain Number of MPI process.
Checks/Verification During Run
CALL ENGINE_USER_CHECK(MY_RANK,TSTOP,NCYCLE,TT,MSTOP)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_CHECK" :: ENGINE_USER_CHECK
!DEC$ ATTRIBUTES REFERENCE :: MY_RANK,TSTOP,NCYCLE,TT,MSTOP
#endif
LINE
- Character string with the message.
MY_RANK
MY_RANK
takes the values from 0 toNSPMD
-1.TSTOP
- Final simulation time.
NCYCLE
- Current explicit cycle number.
TT
- Current simulation time.
MSTOP
- Output value: if
MSTOP
> 0, Radioss will terminate with restart writing. Refer to Comment 1.
Finalization
CALL ENGINE_USER_FINALIZE(MY_RANK)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_FINALIZE" :: ENGINE_USER_FINALIZE
!DEC$ ATTRIBUTES REFERENCE :: MY_RANK
#endif
LINE
- Character string with the message.
MY_RANK
MY_RANK
takes the values from 0 toNSPMD
-1.
Comments
MSTOP
must always be set as return value. WhenMSTOP
is greater than zero, Radioss will terminate by writing a restart file and eventually a last animation file.