Utility to handle MPI communications
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(MPI_Datatype), | public | :: | COMPLEX_DP |
MPI Datatype for double precision complex numbers |
|||
| type(MPI_Datatype), | public | :: | COMPLEX_SP |
MPI Datatype for single precision complex numbers |
|||
| type(MPI_Datatype), | public | :: | COMPLEX_WP |
MPI Datatype for working precision complex numbers |
|||
| type(MPI_Datatype), | public | :: | INT8 |
MPI Datatype for 8-byte integers |
|||
| type(MPI_Datatype), | public | :: | INTEGER |
MPI Datatype for 4-byte integers |
|||
| type(MPI_Datatype), | public | :: | LOGICAL |
MPI Datatype for logicals |
|||
| type(MPI_Datatype), | public | :: | REAL_DP |
MPI Datatype for double precision reals |
|||
| type(MPI_Datatype), | public | :: | REAL_SP |
MPI Datatype for single precision reals |
|||
| type(MPI_Datatype), | public | :: | REAL_WP |
MPI Datatype for working precision reals |
|||
| type(communicators), | public | :: | comm |
Communicators |
|||
| integer, | public | :: | np(3) |
Number of ranks in each direction |
|||
| integer, | public | :: | nproc |
Total number of ranks |
|||
| integer, | public | :: | npx |
Number of ranks in the x direction |
|||
| integer, | public | :: | npy |
Number of ranks in the y direction |
|||
| integer, | public | :: | npz |
Number of ranks in the z direction |
|||
| type(patch), | public | :: | rank |
Rank and grid decompostion info |
|||
| integer, | private | :: | RootRank | = | 1 |
Rank of the root process |
MPI communicators.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(MPI_Comm), | public | :: | g |
Grid communicator |
|||
| type(MPI_Comm), | public | :: | w |
Default World communicator |
Object that stores the rank of the current process, its coordinates in a Cartesian topology, and ranks of its neighbors.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | L(3) |
Rank of left neighbor in each direction |
|||
| integer, | public | :: | R(3) |
Rank of right neighbor in each direction |
|||
| integer, | public | :: | dir(3) |
Process cooridnates in each direction |
|||
| integer, | public | :: | mine | = | 1 |
Rank of this process |
Determines if this rank is the root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(in) | :: | this |
Parallel object |
Result
Returns the elapsed time since an arbitrary origin. Note that different ranks return different WTIMEs.
Elasped time since arbitrary origin
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| character(len=*), | intent(inout) | :: | A |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(inout) | :: | A |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(inout) | :: | A(:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(inout) | :: | A(:,:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(inout) | :: | A(:,:,:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| logical, | intent(inout) | :: | A |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| logical, | intent(inout) | :: | A(:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(inout) | :: | A |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(inout) | :: | A(:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(inout) | :: | A(:,:) |
Send buffer |
MPI Broadcast operation from root rank.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(inout) | :: | A(:,:,:) |
Send buffer |
Finalizes MPI and the parallel environment.
Initializes the parallel environement.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
MPI LOGICAL OR reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| logical, | intent(in) | :: | A |
Send buffer |
||
| logical, | intent(out) | :: | B |
Receive buffer |
MPI LOGICAL OR reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| logical, | intent(in) | :: | A(:) |
Send buffer |
||
| logical, | intent(out) | :: | B(:) |
Receive buffer |
MPI MAX reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A |
Send buffer |
||
| integer, | intent(out) | :: | B |
Receive buffer |
MPI MAX reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A(:) |
Send buffer |
||
| integer, | intent(out) | :: | B(:) |
Receive buffer |
MPI MAX reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B |
Receive buffer |
MPI MAX reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A(:) |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B(:) |
Receive buffer |
MPI MIN reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A |
Send buffer |
||
| integer, | intent(out) | :: | B |
Receive buffer |
MPI MIN reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A(:) |
Send buffer |
||
| integer, | intent(out) | :: | B(:) |
Receive buffer |
MPI MIN reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B |
Receive buffer |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A(:) |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B(:) |
Receive buffer |
Subroutine to gracefully stop the execution with an optional error message.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| character(len=*), | intent(in), | optional | :: | msg |
Error message |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A |
Send buffer |
||
| integer, | intent(out) | :: | B |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A(:) |
Send buffer |
||
| integer, | intent(out) | :: | B(:) |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A(:,:) |
Send buffer |
||
| integer, | intent(out) | :: | B(:,:) |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| integer, | intent(in) | :: | A(:,:,:) |
Send buffer |
||
| integer, | intent(out) | :: | B(:,:,:) |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A(:) |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B(:) |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A(:,:) |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B(:,:) |
Receive buffer |
MPI SUM reduction operation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| real(kind=wp), | intent(in) | :: | A(:,:,:) |
Send buffer |
||
| real(kind=wp), | intent(out) | :: | B(:,:,:) |
Receive buffer |
Builds a Cartesian topolgy with MPI. Define a root processor at coordinates (1,1,1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| logical, | intent(in) | :: | is_periodic(3) |
Periodicity |
||
| integer, | intent(in) | :: | Ng(3) |
|
||
| integer, | intent(in), | optional | :: | Nb(3) |
Explicit block decomposition |