This module describes transpose_handle_datatype class
This class implements transposition using MPI_Ialltoall(w)
with custom MPI datatypes
For the end user this is DTFFT_BACKEND_MPI_DATATYPE - backend.
But since it does not perform sequence: transpose -> exchange -> unpack, it is internally treated as tranpose_handle.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=MPI_ADDRESS_KIND), | private, | parameter | :: | LB | = | 0 |
Lower bound for all derived datatypes |
| logical, | private, | parameter | :: | IS_P2P_ENABLED | = | .false. |
Is point-to-point communication enabled |
Tranpose backend that uses MPI_Ialltoall(w) with custom MPI datatypes
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(MPI_Comm), | private | :: | comm |
1d communicator |
|||
| logical, | private | :: | is_even | = | .false. |
Is decomposition even |
|
| logical, | private | :: | is_active | = | .false. |
Is async transposition active |
|
| type(handle_t), | private | :: | send |
Handle to send data |
|||
| type(handle_t), | private | :: | recv |
Handle to recieve data |
|||
| type(MPI_Request), | private, | allocatable | :: | requests(:) |
Requests for communication |
||
| integer(kind=int32), | private | :: | n_requests |
Actual number of requests, can be less than size(requests) |
|||
| logical, | private | :: | is_request_created | = | .false. |
Is request created |
| procedure, public, non_overridable, pass(self) :: create | ../../ Creates transpose handle |
| procedure, public, pass(self) :: get_aux_size | ../../ Returns number of bytes required by aux buffer |
| procedure, public, pass(self) :: create_private => create | ../../ Initializes class |
| procedure, public, pass(self) :: execute | ../../ Performs MPI_Ialltoall(w) |
| procedure, public, pass(self) :: execute_end | ../../ Waits for MPI_Ialltoall(w) to complete |
| procedure, public, pass(self) :: destroy | ../../ Destroys class |
| procedure, public, pass(self) :: get_async_active | ../../ Returns .true. if async transposition is active |
Transposition handle class
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(MPI_Datatype), | public, | allocatable | :: | dtypes(:) |
Datatypes buffer |
||
| integer(kind=int32), | public, | allocatable | :: | counts(:) |
Number of datatypes (always equals 1) |
||
| integer(kind=int32), | public, | allocatable | :: | displs(:) |
Displacements is bytes |
| procedure, public, pass(self) :: create => create_handle | ../../ Creates transposition handle |
| procedure, public, pass(self) :: destroy => destroy_handle | ../../ Destroys transposition handle |
Returns if async transpose is active
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_datatype), | intent(in) | :: | self |
Transpose handle |
Creates transposition handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(handle_t), | intent(inout) | :: | self |
Transposition handle |
||
| integer(kind=int32), | intent(in) | :: | n |
Number of datatypes to be created |
Destroys transposition handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(handle_t), | intent(inout) | :: | self |
Transposition handle |
Creates transpose_handle_datatype class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_datatype), | intent(inout) | :: | self |
Transpose handle |
||
| type(MPI_Comm), | intent(in) | :: | comm |
MPI Communicator |
||
| type(pencil), | intent(in) | :: | send |
Send pencil |
||
| type(pencil), | intent(in) | :: | recv |
Recv pencil |
||
| type(dtfft_transpose_t), | intent(in) | :: | transpose_type |
Type of transpose to create |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Base storage |
||
| type(create_args), | intent(in) | :: | kwargs |
Additional arguments |
Executes transposition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_datatype), | intent(inout) | :: | self |
Transpose handle |
||
| real(kind=real32), | intent(inout) | :: | in(:) |
Send pointer |
||
| real(kind=real32), | intent(inout) | :: | out(:) |
Recv pointer |
||
| type(execute_args), | intent(inout) | :: | kwargs |
Additional arguments |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Result of execution |
Ends execution of transposition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_datatype), | intent(inout) | :: | self |
Transpose handle |
||
| type(execute_args), | intent(inout) | :: | kwargs |
Additional arguments |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Destroys transpose_handle_datatype class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_datatype), | intent(inout) | :: | self |
Transpose handle |
Creates two-dimensional transposition datatypes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(pencil), | intent(in) | :: | send |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Rank i is sending this counts |
||
| class(pencil), | intent(in) | :: | recv |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Rank i is recieving this counts |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
Id of transpose plan to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_type |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Datatype), | intent(out) | :: | send_dtype |
Datatype used to send data |
||
| integer(kind=int32), | intent(out) | :: | send_displ |
Send displacement in bytes |
||
| type(MPI_Datatype), | intent(out) | :: | recv_dtype |
Datatype used to recv data |
||
| integer(kind=int32), | intent(out) | :: | recv_displ |
Recv displacement in bytes |
Creates three-dimensional X –> Y and Y -> Z transposition datatypes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(pencil), | intent(in) | :: | send |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Rank i is sending this counts |
||
| class(pencil), | intent(in) | :: | recv |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Rank i is recieving this counts |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
Id of transpose plan to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_type |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Datatype), | intent(out) | :: | send_dtype |
Datatype used to send data |
||
| integer(kind=int32), | intent(out) | :: | send_displ |
Send displacement in bytes |
||
| type(MPI_Datatype), | intent(out) | :: | recv_dtype |
Datatype used to recv data |
||
| integer(kind=int32), | intent(out) | :: | recv_displ |
Recv displacement in bytes |
Creates three-dimensional Y –> X and Z –> Y transposition datatypes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(pencil), | intent(in) | :: | send |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Rank i is sending this counts |
||
| class(pencil), | intent(in) | :: | recv |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Rank i is recieving this counts |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
Id of transpose plan to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_type |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Datatype), | intent(out) | :: | send_dtype |
Datatype used to send data |
||
| integer(kind=int32), | intent(out) | :: | send_displ |
Send displacement in bytes |
||
| type(MPI_Datatype), | intent(out) | :: | recv_dtype |
Datatype used to recv data |
||
| integer(kind=int32), | intent(out) | :: | recv_displ |
Recv displacement in bytes |
Creates three-dimensional X –> Z transposition datatypes Can only be used with 3D slab decomposition when slabs are distributed in Z direction
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(pencil), | intent(in) | :: | send |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Rank i is sending this counts |
||
| class(pencil), | intent(in) | :: | recv |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Rank i is recieving this counts |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
Id of transpose plan to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_type |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Datatype), | intent(out) | :: | send_dtype |
Datatype used to send data |
||
| integer(kind=int32), | intent(out) | :: | send_displ |
Send displacement in bytes |
||
| type(MPI_Datatype), | intent(out) | :: | recv_dtype |
Datatype used to recv data |
||
| integer(kind=int32), | intent(out) | :: | recv_displ |
Recv displacement in bytes |
Creates three-dimensional Z –> X transposition datatypes Can only be used with 3D slab decomposition when slabs are distributed in Z direction
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(pencil), | intent(in) | :: | send |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Rank i is sending this counts |
||
| class(pencil), | intent(in) | :: | recv |
Information about send buffer |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Rank i is recieving this counts |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
Id of transpose plan to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_type |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Datatype), | intent(out) | :: | send_dtype |
Datatype used to send data |
||
| integer(kind=int32), | intent(out) | :: | send_displ |
Send displacement in bytes |
||
| type(MPI_Datatype), | intent(out) | :: | recv_dtype |
Datatype used to recv data |
||
| integer(kind=int32), | intent(out) | :: | recv_displ |
Recv displacement in bytes |
Frees temporary datatypes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MPI_Datatype), | intent(inout), | optional | :: | t1 |
Temporary datatype |
|
| type(MPI_Datatype), | intent(inout), | optional | :: | t2 |
Temporary datatype |
|
| type(MPI_Datatype), | intent(inout), | optional | :: | t3 |
Temporary datatype |
|
| type(MPI_Datatype), | intent(inout), | optional | :: | t4 |
Temporary datatype |