Appearance
adam_mpih_object
ADAM, MPI handler class definition.
Source: src/lib/common/adam_mpih_object.F90
Dependencies
Contents
Derived Types
mpih_object
MPI handler class.
Inheritance
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
myrank | integer(kind=I4P) | MPI rank process. | |
myrankstr | character(len=:) | allocatable | MPI rank process stringified. |
procs_number | integer(kind=I4P) | Number of MPI processes. | |
memory_avail | real(kind=R8P) | CPU memory available (GB) for each process. | |
error | integer(kind=I4P) | Error traping flag. | |
timing | real(kind=R8P) | Tic toc timing. | |
tictoc | integer(kind=I4P) | Next is tic or toc? | |
req_send_recv | integer(kind=I4P) | allocatable | MPI request receive flags. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
abort | pass(self) | Handy MPI abort wrapper. |
barrier | pass(self) | Handy MPI barrier wrapper. |
description | pass(self) | Return pretty-printed object description. |
error_stop | pass(self) | Stop run with error output. |
finalize | pass(self) | Handy MPI finalize wrapper. |
initialize | pass(self) | Initialize MPI handler data. |
print_message | pass(self) | Print a message on stdout with rank prefix. |
tictoc_timing | pass(self) | Return the last tic toc timing. |
tic | pass(self) | Start a tic toc timing. |
toc | pass(self) | Stop a tic toc timing. |
Subroutines
abort
Handy MPI abort wrapper.
fortran
subroutine abort(self, error_code, msg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. | |
error_code | integer(kind=I4P) | in | optional | Abort error code. |
msg | character(len=*) | in | optional | Error message. |
barrier
Handy MPI barrier wrapper.
fortran
subroutine barrier(self, tictoc, timing, single)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. | |
tictoc | logical | in | optional | Activate tic toc timing between 2 barrier calls. |
timing | real(kind=R8P) | out | optional | Current timing. |
single | logical | in | optional | Single tictoc for one-shot timing. |
Call graph
error_stop
Stop run with error output.
fortran
subroutine error_stop(self, msg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. | |
msg | character(len=*) | in | optional | Error message. |
Call graph
finalize
Handy MPI finalize wrapper.
fortran
subroutine finalize(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. |
Call graph
initialize
Initialize MPI handler data.
fortran
subroutine initialize(self, do_mpi_init, do_device_init, myrankstr_char_length, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. | |
do_mpi_init | logical | in | optional | Flag to activate MPI init call. |
do_device_init | logical | in | optional | Flag to activate device init call (used by backends). |
myrankstr_char_length | integer(kind=I4P) | in | optional | MPI ID string length. |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
print_message
Print a message on stdout with rank prefix.
fortran
subroutine print_message(self, msg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | in | MPI handler. | |
msg | character(len=*) | in | Message to print. |
Call graph
tic
Start a tic toc timing.
fortran
subroutine tic(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. |
Functions
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | in | MPI handler. |
Call graph
tictoc_timing
Return the last tic toc timing.
Returns: real(kind=R8P)
fortran
function tictoc_timing(self) result(timing)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | in | MPI handler. |
Call graph
toc
Stop a tic toc timing.
Returns: real(kind=R8P)
fortran
function toc(self) result(timing)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(mpih_object) | inout | MPI handler. |
Call graph