This module describes transpose_plan class
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int8), | private, | save | :: | FORWARD_PLAN_IDS(3) |
Default data types for forward transpositions |
||
| integer(kind=int8), | private, | save | :: | BACKWARD_PLAN_IDS(3) |
Default data types for backward transpositions |
||
| logical, | private, | save | :: | ARE_DATATYPES_SET | = | .false. |
Are default data types set |
Transpose 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 |
||
| logical, | private | :: | is_z_slab |
Is Z-slab optimization enabled |
|||
| logical, | private | :: | is_y_slab |
Is Y-slab optimization enabled |
| 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) :: destroy | |
| 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_z_slab | ../../ Returns .true. if Z-slab optimization is enabled |
| procedure, public, non_overridable, pass(self) :: get_y_slab | ../../ Returns .true. if Y-slab optimization is enabled |
Creates transposition plan
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_plan), | intent(inout) | :: | self |
Transposition class |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to create plan for |
||
| integer(kind=int32), | intent(in) | :: | dims(:) |
Global sizes of the transform requested |
||
| type(MPI_Comm), | intent(in) | :: | base_comm |
Base communicator |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
|
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(MPI_Comm), | intent(out) | :: | cart_comm |
Cartesian communicator |
||
| type(MPI_Comm), | intent(out) | :: | comms(:) |
Array of 1d communicators |
||
| type(pencil), | intent(out) | :: | pencils(:) |
Data distributing meta |
||
| type(pencil_init), | intent(in), | optional | :: | ipencil |
Pencil passed by user |
Error code
Returns .true. if Z-slab optimization is enabled
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_plan), | intent(in) | :: | self |
Transposition class |
Returns .true. if Y-slab optimization is enabled
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_plan), | intent(in) | :: | self |
Transposition class |
Creates forward and backward transpose plans for backend DTFFT_BACKEND_MPI_DATATYPE based on source and target data distributions and,
executes them DTFFT_MEASURE_ITERS times ( 4 * DTFFT_MEASURE_ITERS iterations total ) + 4 * DTFFT_MEASURE_WARMUP_ITERS warmup iterations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(create_args), | intent(inout) | :: | create_kwargs | |||
| integer(kind=int64), | intent(in) | :: | buffer_size | |||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper |
||
| type(pencil), | intent(in) | :: | from |
Source meta |
||
| type(pencil), | intent(in) | :: | to |
Target meta |
||
| integer(kind=int8), | intent(in) | :: | transpose_name_id |
ID of transpose name (from -3 to 3, except 0) |
||
| integer(kind=int8), | intent(out) | :: | forward_id |
Best forward plan ID |
||
| integer(kind=int8), | intent(out) | :: | backward_id |
Best backward plan ID |
Elapsed time for best plans selected
Creates transpose plan for backend DTFFT_BACKEND_MPI_DATATYPE and executes it DTFFT_MEASURE_WARMUP_ITERS + DTFFT_MEASURE_ITERS times
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(create_args), | intent(inout) | :: | create_kwargs | |||
| integer(kind=int64), | intent(in) | :: | buffer_size | |||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper |
||
| type(pencil), | intent(in) | :: | from |
Source meta |
||
| type(pencil), | intent(in) | :: | to |
Target meta |
||
| integer(kind=int8), | intent(in) | :: | datatype_id |
ID of transpose (1 or 2) |
||
| integer(kind=int8), | intent(in) | :: | transpose_name_id |
ID of transpose name (from -3 to 3, except 0) |
Execution time [ms]
Runs through all possible grid decompositions and selects the best one based on the lowest average execution time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to use |
||
| integer(kind=int32), | intent(in) | :: | dims(:) |
Global sizes of the transform requested |
||
| type(MPI_Comm), | intent(in) | :: | base_comm |
3D comm |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
How thoroughly |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI_Datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to use |
||
| integer(kind=int8), | intent(inout) | :: | best_forward_ids(:) |
Best Datatype ids for forward plan |
||
| integer(kind=int8), | intent(inout) | :: | best_backward_ids(:) |
Best Datatype ids for backward plan |
||
| integer(kind=int32), | intent(out) | :: | best_decomposition(:) |
Best decomposition found |
||
| type(dtfft_backend_t), | intent(in), | optional | :: | backend |
GPU Backend to test. Should be passed only when effort is |
|
| real(kind=real32), | intent(out), | optional | :: | min_execution_time |
Elapsed time for best plan selected |
|
| type(dtfft_backend_t), | intent(out), | optional | :: | best_backend |
Best backend selected |
Creates cartesian grid and runs various backends on it. Returns best backend and execution time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to create plan for |
||
| integer(kind=int32), | intent(in) | :: | dims(:) |
Global sizes of the transform requested |
||
| type(MPI_Comm), | intent(in) | :: | base_comm |
Basic communicator to create 3d grid from |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
How thoroughly |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI_Datatype |
||
| integer(kind=int32), | intent(in) | :: | comm_dims(:) |
Number of processors in each dimension |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to use |
||
| logical, | intent(in) | :: | is_z_slab |
Is Z-slab optimization enabled |
||
| integer(kind=int8), | intent(inout) | :: | best_forward_ids(:) |
Best Datatype ids for forward plan |
||
| integer(kind=int8), | intent(inout) | :: | best_backward_ids(:) |
Best Datatype ids for backward plan |
||
| type(dtfft_backend_t), | intent(in), | optional | :: | backend |
GPU Backend to test. Should be passed only when effort is |
|
| real(kind=real32), | intent(out), | optional | :: | best_time |
Elapsed time for best plan selected |
|
| type(dtfft_backend_t), | intent(out), | optional | :: | best_backend |
Best backend selected for the grid |
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) | :: | comms(:) |
1D comms |
||
| type(MPI_Comm), | intent(in) | :: | cart_comm |
3D Cartesian comm |
||
| type(dtfft_effort_t), | intent(in) | :: | effort | |||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base MPI_Datatype |
||
| type(pencil), | intent(in) | :: | pencils(:) |
Source meta |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to use |
||
| logical, | intent(in) | :: | is_z_slab |
Is Z-slab optimization enabled |
||
| integer(kind=int8), | intent(inout) | :: | best_forward_ids(:) |
Best Datatype ids for forward plan |
||
| integer(kind=int8), | intent(inout) | :: | best_backward_ids(:) |
Best Datatype ids for backward plan |
||
| type(dtfft_backend_t), | intent(in), | optional | :: | backend |
GPU Backend to test. Should be passed only when effort is |
|
| real(kind=real32), | intent(out), | optional | :: | best_time |
Elapsed time for best backend |
|
| type(dtfft_backend_t), | intent(out), | optional | :: | best_backend |
Best backend selected |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(create_args), | intent(inout) | :: | create_kwargs | |||
| integer(kind=int64), | intent(in) | :: | buffer_size | |||
| type(backend_helper), | intent(inout) | :: | helper |
Base MPI_Datatype |
||
| type(pencil), | intent(in) | :: | pencils(:) |
Source meta |
||
| logical, | intent(in) | :: | is_z_slab |
Is Z-slab optimization enabled |
||
| integer(kind=int8), | intent(out) | :: | best_forward_ids(:) |
Best Datatype ids for forward plan |
||
| integer(kind=int8), | intent(out) | :: | best_backward_ids(:) |
Best Datatype ids for backward plan |
||
| real(kind=real32), | intent(out) | :: | elapsed_time |
Elapsed time for best plans selected in [ms] |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | ndims | |||
| integer(kind=int8), | allocatable | :: | dperm(:,:) | |||
| integer(kind=int8), | allocatable | :: | cperm(:,:) |
Creates cartesian communicator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | dims(:) |
Global dimensions |
||
| type(MPI_Comm), | intent(in) | :: | old_comm |
Communicator to create cartesian from |
||
| integer(kind=int32), | intent(in) | :: | comm_dims(:) |
Dims in cartesian communicator |
||
| type(MPI_Comm), | intent(out) | :: | comm |
Cartesian communicator |
||
| type(MPI_Comm), | intent(out) | :: | local_comms(:) |
1d communicators in cartesian communicator |
||
| type(pencil), | intent(out) | :: | pencils(:) |
Data distributing meta |
||
| type(pencil_init), | intent(in), | optional | :: | ipencil |
Pencil passed by user |
Creates cartesian communicator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MPI_Comm), | intent(in) | :: | old_comm |
Communicator to create cartesian from |
||
| integer(kind=int32), | intent(in) | :: | comm_dims(:) |
Dims in cartesian communicator |
||
| type(MPI_Comm), | intent(out) | :: | comm |
Cartesian communicator |
||
| type(MPI_Comm), | intent(out) | :: | local_comms(:) |
1d communicators in cartesian communicator |
||
| type(pencil_init), | intent(in), | optional | :: | ipencil |
Pencil passed by user |