This module handles the various status bits and performs the relevant communications. For example if one process ends, this information is stored in a bit and communicated to all other processors.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | tem_stat_nFlags | = | 10 | Number of available status flags. |
integer, | public, | parameter | :: | tem_stat_interval | = | 1 | Indicator for the overall steering interval to being reached. |
integer, | public, | parameter | :: | tem_stat_steady_state | = | 2 | A steady state condition has been reached. |
integer, | public, | parameter | :: | tem_stat_run_terminate | = | 3 | The application is to terminate abnormally. |
integer, | public, | parameter | :: | tem_stat_global_error | = | 4 | Some global error occurred. |
integer, | public, | parameter | :: | tem_stat_nan_detected | = | 5 | A NaN was detected during the computation. |
integer, | public, | parameter | :: | tem_stat_nonPhysical | = | 6 | A non-physical state was detected during the computation. |
integer, | public, | parameter | :: | tem_stat_max_sim | = | 7 | The maximal simulation time has been reached. |
integer, | public, | parameter | :: | tem_stat_max_iter | = | 8 | The maximal number of iterations has been reached. |
integer, | public, | parameter | :: | tem_stat_max_clock | = | 9 | The maximall wall-clock time was reached. |
integer, | public, | parameter | :: | tem_stat_stop_file | = | 10 | A stop file was encountered. |
Define an array to hold all status flags
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | check_request | = | MPI_REQUEST_NULL | ||
logical, | private | :: | bits(tem_stat_nFlags) | = | .false. | ||
logical, | private | :: | oldbits(tem_stat_nFlags) | = | .false. |
Decide if the simulation run should end based on the status flags.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(in) | :: | me | Status to check if the run has to end. |
Result indicating if the run should come to a regular end.
Decide if the simulation run should abnormally terminate based on the status flags.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(in) | :: | me | Status to check for an extraordinary termination of the run. |
Result indicating if the run should com to an irregular end.
Clear (unset) all status bits.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(inout) | :: | me | Status type to initialize. |
Write the status in me to outUnit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(in) | :: | me | Status to write on outunit. |
||
integer, | intent(in) | :: | outUnit | The file unit to write to. |
Perform the communication of status bits
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(inout) | :: | me | Status to communicate. |
||
integer, | intent(in) | :: | comm | Communicator to use for the MPI reduction operation. |
Perform the communication of status bits with a nonblocking allreduce resulting in an delayed communication by one check_iter interval.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_status_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | comm | Communicator to use for the MPI reduction operation. |