This module describes reshape_plan class
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | private, | parameter | :: | NEIGHBOR_GROUP | = | 1 | |
| integer(kind=int32), | private, | parameter | :: | STRIDED_GROUP | = | 2 |
Reshape Plan class This class is a container for transposition plans
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | public | :: | backend |
Backend |
|||
| type(backend_helper), | public | :: | helper |
Backend helper |
|||
| integer(kind=int64), | public | :: | min_buffer_size |
Minimal buffer size for transposition |
|||
| type(dtfft_platform_t), | public | :: | platform |
Platform used for transposition |
|||
| type(dtfft_stream_t), | public | :: | stream |
CUDA stream |
|||
| type(reshape_container), | public, | allocatable | :: | plans(:) |
Plans for each reshape operation |
||
| type(string), | public, | allocatable | :: | names(:) |
Names of each reshape operation |
||
| integer(kind=int32), | private, | allocatable | :: | init_grid(:) | |||
| integer(kind=int32), | private, | allocatable | :: | final_grid(:) | |||
| type(MPI_Comm), | private, | allocatable | :: | comms(:) |
| procedure, public, pass(self), non_overridable :: init | |
| procedure, public, pass(self), non_overridable :: get_async_active | |
| procedure, public, pass(self), non_overridable :: get_aux_bytes | ../../ Returns auxiliary buffer size |
| procedure, public, pass(self), non_overridable :: is_aux_needed | |
| procedure, public, pass(self), non_overridable :: get_backend | ../../ Returns backend id |
| procedure, public, pass(self), non_overridable :: execute | |
| procedure, public, pass(self), non_overridable :: execute_end | |
| procedure, public, pass(self), non_overridable :: mem_alloc | |
| procedure, public, pass(self), non_overridable :: mem_free | |
| procedure, public, non_overridable, pass(self) :: create | ../../ Creates transpose plan |
| procedure, public, non_overridable, pass(self) :: get_grid | ../../ Returns grid for specified reshape |
| procedure, public, non_overridable, pass(self) :: destroy |
Creates reshape plan
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan), | intent(inout) | :: | self |
Reshape plan to be initialized |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to create plan for (HOST or CUDA) |
||
| type(pencil_init), | intent(in) | :: | ipencil |
Pencil decomposition passed by user |
||
| type(pencil), | intent(in) | :: | pencils(:) |
Array of pencil decompositions for different layouts |
||
| type(MPI_Comm), | intent(in) | :: | comm |
Global MPI communicator |
||
| type(MPI_Comm), | intent(in) | :: | local_comms(:) |
Local MPI communicators for each dimension |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI datatype for complex data |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single complex element |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
dtFFT planner effort level (ESTIMATE, MEASURE, PATIENT, EXHAUSTIVE) |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Communication backend to use |
||
| type(MPI_Datatype), | intent(in) | :: | base_init_dtype |
Base MPI datatype for real data |
||
| integer(kind=int64), | intent(in) | :: | base_init_storage |
Number of bytes needed to store single real element |
||
| type(pencil), | intent(out) | :: | bricks(:) |
Pencils describing brick data distribution |
||
| logical, | intent(out) | :: | is_final_enabled |
Flag indicating if final reshape in Fourier space is enabled |
Error code: DTFFT_SUCCESS on success
Checks if two communication backends are compatible
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | intent(in) | :: | backend1 |
First backend to compare |
||
| type(dtfft_backend_t), | intent(in) | :: | backend2 |
Second backend to compare |
Returns a compatible reshape backend for the given main backend and platform
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | intent(in) | :: | backend |
Input backend from main FFT plan |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Execution platform (HOST or CUDA) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan), | intent(inout) | :: | self |
Returns grid decomposition for specified dimension
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan), | intent(in), | target | :: | self |
Reshape plan |
|
| integer(kind=int8), | intent(in) | :: | dim |
Dimension: 1 for initial grid, other values for final grid |
||
| integer(kind=int32), | intent(out), | pointer | :: | grid(:) |
Pointer to grid array |
Creates custom MPI communicator by splitting processes into groups
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MPI_Comm), | intent(in) | :: | old_comm |
Original MPI communicator to split |
||
| integer(kind=int32), | intent(in) | :: | new_size |
Size of each group in the new communicator |
||
| integer(kind=int32), | intent(in) | :: | group_type |
Type of grouping: NEIGHBOR_GROUP (consecutive ranks) or STRIDED_GROUP (interleaved ranks) |
||
| type(MPI_Comm), | intent(out) | :: | new_comm |
Newly created MPI communicator |
Creates and allocates all reshape operation plans
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(inout), | allocatable | :: | plans(:) |
Array of reshape plan containers to be allocated and initialized |
|
| type(dtfft_backend_t), | intent(in) | :: | backend |
Communication backend to use for reshape operations |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Execution platform (HOST or CUDA) |
||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper for communication setup |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
dtFFT planner effort level |
||
| logical, | intent(in) | :: | force_effort | |||
| type(MPI_Datatype), | intent(in) | :: | base_init_dtype |
Base MPI datatype for real space data |
||
| integer(kind=int64), | intent(in) | :: | base_init_storage |
Number of bytes needed to store single real element |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI datatype for Fourier space data |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single complex element |
||
| type(pencil), | intent(in) | :: | bricks(:) |
Pencils describing brick data distribution |
||
| type(pencil), | intent(in) | :: | pencils(:) |
Array of pencil decompositions |
Runs autotune for all backends
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to create plan for |
||
| type(MPI_Comm), | intent(in) | :: | base_comm |
3D Cartesian comm |
||
| type(MPI_Comm), | intent(in) | :: | comms(:) |
1D comms |
||
| type(MPI_Datatype), | intent(in) | :: | base_init_dtype |
Base MPI datatype for real space data |
||
| integer(kind=int64), | intent(in) | :: | base_init_storage |
Number of bytes needed to store single real element |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI datatype for Fourier space data |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single complex element |
||
| type(pencil), | intent(in) | :: | bricks(:) |
Pencils describing brick data distribution |
||
| type(pencil), | intent(in) | :: | pencils(:) |
Array of pencil decompositions |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to use |
||
| integer(kind=int64), | intent(in) | :: | buffer_size |
Size of the buffer to use during autotune (in bytes) |
||
| type(dtfft_backend_t), | intent(in) | :: | transpose_backend |
Backend used in transpose plans |
||
| type(dtfft_backend_t), | intent(out) | :: | best_backend |
Best backend selected |