This module describes transpose_plan_host class
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int8), | private, | save | :: | FORWARD_PLAN_IDS(3) | |||
integer(kind=int8), | private, | save | :: | BACKWARD_PLAN_IDS(3) |
Host transpose plan
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dtfft_backend_t), | public | :: | backend | = | DTFFT_BACKEND_MPI_DATATYPE |
GPU backend |
|
type(backend_helper), | public | :: | helper |
Backend helper |
|||
logical, | public | :: | is_z_slab |
Z-slab optimization flag (for 3D transforms) |
|||
integer(kind=int64), | public | :: | min_buffer_size |
Minimal buffer size for transposition |
|||
type(transpose_handle_host), | private, | allocatable | :: | fplans(:) |
Forward plans |
||
type(transpose_handle_host), | private, | allocatable | :: | bplans(:) |
Backward plans |
procedure, public, pass(self) :: create | ../../ Create transposition plan |
procedure, public, pass(self) :: execute | ../../ Executes transposition |
procedure, public, non_overridable, pass(self) :: get_backend | ../../ Returns backend id |
procedure, public, non_overridable, pass(self) :: mem_alloc | ../../ Allocates memory based on selected backend |
procedure, public, non_overridable, pass(self) :: mem_free | ../../ Frees memory allocated with mem_alloc |
procedure, public :: create_private | |
procedure, public :: execute_private | |
procedure, public :: destroy | |
procedure, private, nopass :: get_plan_execution_time | |
procedure, private, pass(self) :: autotune_transpose_id | |
procedure, private, pass(self) :: autotune_mpi_datatypes | |
procedure, private, pass(self) :: autotune_grid_decomposition | |
procedure, private, pass(self) :: autotune_grid |
Creates transposition plans
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(inout) | :: | self |
Transposition class |
||
integer(kind=int32), | intent(in) | :: | dims(:) |
Global sizes of the transform requested |
||
integer(kind=int32), | intent(in) | :: | transposed_dims(:,:) |
Transposed sizes of the transform requested |
||
type(MPI_Comm), | intent(in) | :: | base_comm |
Base communicator |
||
integer(kind=int32), | intent(in) | :: | comm_dims(:) |
Number of MPI Processes in all directions |
||
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 |
||
logical, | intent(in) | :: | is_custom_cart_comm |
Is custom Cartesian communicator provided by user |
||
type(MPI_Comm), | intent(out) | :: | cart_comm |
Cartesian communicator |
||
type(MPI_Comm), | intent(out) | :: | comms(:) |
Array of 1d communicators |
||
type(pencil), | intent(out) | :: | pencils(:) |
Pencils |
Error code
Creates forward and backward transpose plans bases on source and target data distributing,
executes them DTFFT_MEASURE_ITERS
times ( 4 * DTFFT_MEASURE_ITERS
iterations total )
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(in) | :: | self |
Abstract plan |
||
type(MPI_Comm), | intent(in) | :: | comm |
1D comm in case of pencils, 3D comm in case of z_slabs |
||
type(MPI_Comm), | intent(in) | :: | cart_comm |
3D Cartesian comm |
||
type(pencil), | intent(in) | :: | from |
Source meta |
||
type(pencil), | intent(in) | :: | to |
Target meta |
||
type(MPI_Datatype), | intent(in) | :: | base_dtype |
Basic MPI Datatype |
||
integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store Basic MPI Datatype |
||
integer(kind=int8), | intent(in) | :: | transpose_name_id |
ID of transpose name (from -3 to 3, except 0) |
||
real(kind=real32), | intent(inout) | :: | a(:) |
Source buffer |
||
real(kind=real32), | intent(inout) | :: | b(:) |
Target buffer |
||
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 and executes it DTFFT_MEASURE_WARMUP_ITERS
+ DTFFT_MEASURE_ITERS
times
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(MPI_Comm), | intent(in) | :: | comm |
1D comm in case of pencils, 3D comm in case of z_slabs |
||
type(MPI_Comm), | intent(in) | :: | cart_comm |
3D Cartesian comm |
||
type(pencil), | intent(in) | :: | from |
Source meta |
||
type(pencil), | intent(in) | :: | to |
Target meta |
||
type(MPI_Datatype), | intent(in) | :: | base_dtype |
Basic MPI Datatype |
||
integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store Basic MPI Datatype |
||
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) |
||
real(kind=real32), | intent(inout) | :: | a(:) |
Source buffer |
||
real(kind=real32), | intent(inout) | :: | b(:) |
Target buffer |
Execution time
Executes single transposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(inout) | :: | self |
Transposition class |
||
real(kind=real32), | intent(inout) | :: | in(:) |
Incoming buffer |
||
real(kind=real32), | intent(inout) | :: | out(:) |
Resulting buffer |
||
type(dtfft_transpose_t), | intent(in) | :: | transpose_type |
Type of transpose to execute |
Destroys transposition plans
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(inout) | :: | self |
Transposition class |
Runs through all possible grid decompositions and selects the best one based on the lowest average execution time
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(in) | :: | self |
Abstract plan |
||
integer(kind=int32), | intent(in) | :: | dims(:) |
Global dims |
||
integer(kind=int32), | intent(in) | :: | transposed_dims(:,:) |
Transposed dims |
||
type(MPI_Comm), | intent(in) | :: | base_comm |
Base communicator |
||
type(dtfft_effort_t), | intent(in) | :: | effort |
How thoroughly |
||
integer(kind=int8), | intent(in) | :: | n_transpose_plans |
Number of transpose plans to test |
||
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 |
||
integer(kind=int32), | intent(out) | :: | best_comm_dims(:) |
Best communicator dimensions |
||
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 |
Creates cartesian communicator and executes various datatypes on it
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(in) | :: | self |
Abstract plan |
||
type(MPI_Comm), | intent(in) | :: | base_comm |
Base communicator |
||
integer(kind=int32), | intent(in) | :: | comm_dims(:) |
Number of MPI Processes in Y and Z directions |
||
integer(kind=int32), | intent(in) | :: | dims(:) |
Global dims |
||
integer(kind=int32), | intent(in) | :: | transposed_dims(:,:) |
Transposed dims |
||
type(dtfft_effort_t), | intent(in) | :: | effort |
How thoroughly |
||
type(MPI_Datatype), | intent(in) | :: | base_dtype |
Basic MPI Datatype |
||
integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store Basic MPI Datatype |
||
integer(kind=int32), | intent(inout) | :: | latest_timer_id |
Current timer id |
||
real(kind=real64), | intent(inout) | :: | timers(:) |
Time of current function execution is stored in timers(latest_timer_id) |
||
integer(kind=int32), | intent(inout) | :: | decomps(:,:) |
Current decomposition is stored in decomps(:, latest_timer_id) |
||
integer(kind=int8), | intent(inout) | :: | forw_ids(:,:) |
Best Forward ids are stored in forw_ids(:, latest_timer_id) |
||
integer(kind=int8), | intent(inout) | :: | back_ids(:,:) |
Best Backward ids are stored in back_ids(:, latest_timer_id) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(transpose_plan_host), | intent(in) | :: | self |
Host plan |
||
type(pencil), | intent(in) | :: | pencils(:) |
Array of pencils |
||
type(MPI_Comm), | intent(in) | :: | cart_comm |
3D Cartesian comm |
||
type(MPI_Comm), | intent(in) | :: | comms(:) |
Array of 1d communicators |
||
type(MPI_Datatype), | intent(in) | :: | base_dtype |
Basic MPI Datatype |
||
integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store Basic MPI Datatype |
||
real(kind=real32), | intent(inout) | :: | a(:) |
Work buffer |
||
real(kind=real32), | intent(inout) | :: | b(:) |
Work buffer |
||
integer(kind=int8), | intent(inout) | :: | forward_ids(:) |
Forward plan IDs |
||
integer(kind=int8), | intent(inout) | :: | backward_ids(:) |
Backward plan IDs |
||
real(kind=real64), | intent(out) | :: | elapsed_time |
Elapsed time |