Module for handling some common MPI operations and MPI groups
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | MPI_COMM_UNDEFINED | = | -1 | |
integer, | private | :: | default_comm |
Overload the default construct for mpi_grp_t
Contructor for mpi_grp_t class.
This sets the communicator of the group and gets the size of the group and rank of current process. If no communicator is provided, it will use the default defined when calling mpi_mod_init.
Note that when the undefined communicator is used, the group size is 1 and the rank to 0, such that the code can work in serial mode.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | comm |
MPI communicator |
Class to handle MPI groups. This class stores information about the group and the current proccess.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | comm | = | MPI_COMM_UNDEFINED |
Communicator |
|
integer, | public | :: | rank | = | -1 |
Rank of the current process |
|
integer, | public | :: | size | = | -1 |
Size of the communicator |
Overload the default construct for mpi_grp_t
private function mpi_grp_constructor (comm) | Contructor for mpi_grp_t class. |
procedure, public :: abort => mpi_grp_abort | ../../../../ Send abort signal to processes in this group |
Contructor for mpi_grp_t class.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | comm |
MPI communicator |
Finalise MPI.
Class method to abort execution of an MPI group.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mpi_grp_t), | intent(in) | :: | this |
Check if an MPI return code signaled an error. If so, print the corresponding message and abort the execution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ierr |
Error code |