dtfft_transpose_plan Module

This module describes transpose_plan class


Uses

  • module~~dtfft_transpose_plan~~UsesGraph module~dtfft_transpose_plan dtfft_transpose_plan iso_c_binding iso_c_binding module~dtfft_transpose_plan->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_transpose_plan->iso_fortran_env module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_transpose_plan->module~dtfft_abstract_backend module~dtfft_abstract_compressor dtfft_abstract_compressor module~dtfft_transpose_plan->module~dtfft_abstract_compressor module~dtfft_abstract_reshape_handle dtfft_abstract_reshape_handle module~dtfft_transpose_plan->module~dtfft_abstract_reshape_handle module~dtfft_config dtfft_config module~dtfft_transpose_plan->module~dtfft_config module~dtfft_errors dtfft_errors module~dtfft_transpose_plan->module~dtfft_errors module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_transpose_plan->module~dtfft_interface_nvtx module~dtfft_parameters dtfft_parameters module~dtfft_transpose_plan->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_transpose_plan->module~dtfft_pencil module~dtfft_reshape_plan_base dtfft_reshape_plan_base module~dtfft_transpose_plan->module~dtfft_reshape_plan_base module~dtfft_utils dtfft_utils module~dtfft_transpose_plan->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_transpose_plan->mpi_f08 module~dtfft_abstract_backend->iso_c_binding module~dtfft_abstract_backend->iso_fortran_env module~dtfft_abstract_backend->module~dtfft_errors module~dtfft_abstract_backend->module~dtfft_interface_nvtx module~dtfft_abstract_backend->module~dtfft_parameters module~dtfft_abstract_backend->module~dtfft_pencil module~dtfft_abstract_backend->module~dtfft_utils module~dtfft_abstract_backend->mpi_f08 module~dtfft_abstract_kernel dtfft_abstract_kernel module~dtfft_abstract_backend->module~dtfft_abstract_kernel module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_abstract_backend->module~dtfft_interface_cuda_runtime module~dtfft_interface_nccl dtfft_interface_nccl module~dtfft_abstract_backend->module~dtfft_interface_nccl module~dtfft_abstract_compressor->iso_c_binding module~dtfft_abstract_compressor->iso_fortran_env module~dtfft_abstract_compressor->module~dtfft_errors module~dtfft_abstract_compressor->module~dtfft_interface_nvtx module~dtfft_abstract_compressor->module~dtfft_parameters module~dtfft_abstract_compressor->module~dtfft_utils module~dtfft_abstract_compressor->mpi_f08 module~dtfft_abstract_reshape_handle->iso_c_binding module~dtfft_abstract_reshape_handle->iso_fortran_env module~dtfft_abstract_reshape_handle->module~dtfft_abstract_backend module~dtfft_abstract_reshape_handle->module~dtfft_abstract_compressor module~dtfft_abstract_reshape_handle->module~dtfft_config module~dtfft_abstract_reshape_handle->module~dtfft_parameters module~dtfft_abstract_reshape_handle->module~dtfft_pencil module~dtfft_abstract_reshape_handle->module~dtfft_utils module~dtfft_abstract_reshape_handle->mpi_f08 module~dtfft_config->iso_c_binding module~dtfft_config->iso_fortran_env module~dtfft_config->module~dtfft_abstract_compressor module~dtfft_config->module~dtfft_errors module~dtfft_config->module~dtfft_parameters module~dtfft_config->module~dtfft_utils module~dtfft_config->mpi_f08 module~dtfft_config->module~dtfft_interface_cuda_runtime module~dtfft_errors->iso_fortran_env module~dtfft_interface_nvtx->iso_c_binding module~dtfft_interface_nvtx->module~dtfft_utils module~dtfft_parameters->iso_c_binding module~dtfft_parameters->iso_fortran_env module~dtfft_parameters->mpi_f08 module~dtfft_pencil->iso_c_binding module~dtfft_pencil->iso_fortran_env module~dtfft_pencil->module~dtfft_config module~dtfft_pencil->module~dtfft_errors module~dtfft_pencil->module~dtfft_parameters module~dtfft_pencil->module~dtfft_utils module~dtfft_pencil->mpi_f08 module~dtfft_pencil->module~dtfft_interface_cuda_runtime module~dtfft_reshape_plan_base->iso_c_binding module~dtfft_reshape_plan_base->iso_fortran_env module~dtfft_reshape_plan_base->module~dtfft_abstract_backend module~dtfft_reshape_plan_base->module~dtfft_abstract_compressor module~dtfft_reshape_plan_base->module~dtfft_abstract_reshape_handle module~dtfft_reshape_plan_base->module~dtfft_config module~dtfft_reshape_plan_base->module~dtfft_errors module~dtfft_reshape_plan_base->module~dtfft_interface_nvtx module~dtfft_reshape_plan_base->module~dtfft_parameters module~dtfft_reshape_plan_base->module~dtfft_pencil module~dtfft_reshape_plan_base->module~dtfft_utils module~dtfft_reshape_plan_base->mpi_f08 module~dtfft_interface_cuda dtfft_interface_cuda module~dtfft_reshape_plan_base->module~dtfft_interface_cuda module~dtfft_reshape_plan_base->module~dtfft_interface_cuda_runtime module~dtfft_reshape_plan_base->module~dtfft_interface_nccl module~dtfft_interface_nvrtc dtfft_interface_nvrtc module~dtfft_reshape_plan_base->module~dtfft_interface_nvrtc module~dtfft_interface_nvshmem dtfft_interface_nvshmem module~dtfft_reshape_plan_base->module~dtfft_interface_nvshmem module~dtfft_reshape_handle_datatype dtfft_reshape_handle_datatype module~dtfft_reshape_plan_base->module~dtfft_reshape_handle_datatype module~dtfft_reshape_handle_generic dtfft_reshape_handle_generic module~dtfft_reshape_plan_base->module~dtfft_reshape_handle_generic module~dtfft_utils->iso_c_binding module~dtfft_utils->iso_fortran_env module~dtfft_utils->module~dtfft_errors module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08 module~dtfft_abstract_kernel->iso_c_binding module~dtfft_abstract_kernel->iso_fortran_env module~dtfft_abstract_kernel->module~dtfft_abstract_compressor module~dtfft_abstract_kernel->module~dtfft_config module~dtfft_abstract_kernel->module~dtfft_interface_nvtx module~dtfft_abstract_kernel->module~dtfft_parameters module~dtfft_abstract_kernel->module~dtfft_utils module~dtfft_abstract_kernel->mpi_f08 module~dtfft_interface_cuda->iso_c_binding module~dtfft_interface_cuda->iso_fortran_env module~dtfft_interface_cuda->module~dtfft_errors module~dtfft_interface_cuda->module~dtfft_parameters module~dtfft_interface_cuda->module~dtfft_utils module~dtfft_interface_cuda->mpi_f08 module~dtfft_interface_cuda_runtime->iso_c_binding module~dtfft_interface_cuda_runtime->iso_fortran_env module~dtfft_interface_cuda_runtime->module~dtfft_parameters module~dtfft_interface_cuda_runtime->module~dtfft_utils module~dtfft_interface_nccl->iso_c_binding module~dtfft_interface_nccl->iso_fortran_env module~dtfft_interface_nccl->module~dtfft_parameters module~dtfft_interface_nccl->module~dtfft_utils module~dtfft_interface_nvrtc->iso_c_binding module~dtfft_interface_nvrtc->iso_fortran_env module~dtfft_interface_nvrtc->module~dtfft_errors module~dtfft_interface_nvrtc->module~dtfft_utils module~dtfft_interface_nvshmem->iso_c_binding module~dtfft_interface_nvshmem->iso_fortran_env module~dtfft_interface_nvshmem->module~dtfft_parameters module~dtfft_interface_nvshmem->module~dtfft_utils module~dtfft_interface_nvshmem->mpi_f08 module~dtfft_reshape_handle_datatype->iso_c_binding module~dtfft_reshape_handle_datatype->iso_fortran_env module~dtfft_reshape_handle_datatype->module~dtfft_abstract_reshape_handle module~dtfft_reshape_handle_datatype->module~dtfft_errors module~dtfft_reshape_handle_datatype->module~dtfft_interface_nvtx module~dtfft_reshape_handle_datatype->module~dtfft_parameters module~dtfft_reshape_handle_datatype->module~dtfft_pencil module~dtfft_reshape_handle_datatype->mpi_f08 module~dtfft_reshape_handle_generic->iso_c_binding module~dtfft_reshape_handle_generic->iso_fortran_env module~dtfft_reshape_handle_generic->module~dtfft_abstract_backend module~dtfft_reshape_handle_generic->module~dtfft_abstract_compressor module~dtfft_reshape_handle_generic->module~dtfft_abstract_reshape_handle module~dtfft_reshape_handle_generic->module~dtfft_config module~dtfft_reshape_handle_generic->module~dtfft_errors module~dtfft_reshape_handle_generic->module~dtfft_parameters module~dtfft_reshape_handle_generic->module~dtfft_pencil module~dtfft_reshape_handle_generic->module~dtfft_utils module~dtfft_reshape_handle_generic->mpi_f08 module~dtfft_reshape_handle_generic->module~dtfft_abstract_kernel module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_reshape_handle_generic->module~dtfft_backend_cufftmp_m module~dtfft_backend_mpi dtfft_backend_mpi module~dtfft_reshape_handle_generic->module~dtfft_backend_mpi module~dtfft_backend_nccl_m dtfft_backend_nccl_m module~dtfft_reshape_handle_generic->module~dtfft_backend_nccl_m module~dtfft_kernel_device dtfft_kernel_device module~dtfft_reshape_handle_generic->module~dtfft_kernel_device module~dtfft_kernel_host dtfft_kernel_host module~dtfft_reshape_handle_generic->module~dtfft_kernel_host module~dtfft_backend_cufftmp_m->iso_c_binding module~dtfft_backend_cufftmp_m->iso_fortran_env module~dtfft_backend_cufftmp_m->module~dtfft_abstract_backend module~dtfft_backend_cufftmp_m->module~dtfft_errors module~dtfft_backend_cufftmp_m->module~dtfft_parameters module~dtfft_backend_cufftmp_m->module~dtfft_pencil module~dtfft_backend_cufftmp_m->module~dtfft_utils module~dtfft_backend_cufftmp_m->mpi_f08 module~dtfft_backend_cufftmp_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_cufftmp_m->module~dtfft_interface_nvshmem module~dtfft_interface_cufft dtfft_interface_cufft module~dtfft_backend_cufftmp_m->module~dtfft_interface_cufft module~dtfft_backend_mpi->iso_c_binding module~dtfft_backend_mpi->iso_fortran_env module~dtfft_backend_mpi->module~dtfft_abstract_backend module~dtfft_backend_mpi->module~dtfft_errors module~dtfft_backend_mpi->module~dtfft_interface_nvtx module~dtfft_backend_mpi->module~dtfft_parameters module~dtfft_backend_mpi->module~dtfft_utils module~dtfft_backend_mpi->mpi_f08 module~dtfft_backend_mpi->module~dtfft_interface_cuda_runtime module~dtfft_backend_nccl_m->iso_c_binding module~dtfft_backend_nccl_m->iso_fortran_env module~dtfft_backend_nccl_m->module~dtfft_abstract_backend module~dtfft_backend_nccl_m->module~dtfft_errors module~dtfft_backend_nccl_m->module~dtfft_parameters module~dtfft_backend_nccl_m->module~dtfft_utils module~dtfft_backend_nccl_m->mpi_f08 module~dtfft_backend_nccl_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_nccl_m->module~dtfft_interface_nccl module~dtfft_kernel_device->iso_c_binding module~dtfft_kernel_device->iso_fortran_env module~dtfft_kernel_device->module~dtfft_config module~dtfft_kernel_device->module~dtfft_interface_nvtx module~dtfft_kernel_device->module~dtfft_parameters module~dtfft_kernel_device->module~dtfft_utils module~dtfft_kernel_device->mpi_f08 module~dtfft_kernel_device->module~dtfft_abstract_kernel module~dtfft_kernel_device->module~dtfft_interface_cuda module~dtfft_kernel_device->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_block_optimizer dtfft_nvrtc_block_optimizer module~dtfft_kernel_device->module~dtfft_nvrtc_block_optimizer module~dtfft_nvrtc_module_cache dtfft_nvrtc_module_cache module~dtfft_kernel_device->module~dtfft_nvrtc_module_cache module~dtfft_kernel_host->iso_c_binding module~dtfft_kernel_host->iso_fortran_env module~dtfft_kernel_host->module~dtfft_config module~dtfft_kernel_host->module~dtfft_interface_nvtx module~dtfft_kernel_host->module~dtfft_parameters module~dtfft_kernel_host->module~dtfft_utils module~dtfft_kernel_host->mpi_f08 module~dtfft_kernel_host->module~dtfft_abstract_kernel module~dtfft_interface_cufft->iso_c_binding module~dtfft_interface_cufft->iso_fortran_env module~dtfft_interface_cufft->module~dtfft_parameters module~dtfft_interface_cufft->module~dtfft_utils module~dtfft_nvrtc_block_optimizer->iso_fortran_env module~dtfft_nvrtc_block_optimizer->module~dtfft_config module~dtfft_nvrtc_block_optimizer->module~dtfft_parameters module~dtfft_nvrtc_block_optimizer->module~dtfft_utils module~dtfft_nvrtc_block_optimizer->mpi_f08 module~dtfft_nvrtc_block_optimizer->module~dtfft_abstract_kernel module~dtfft_nvrtc_block_optimizer->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_module_cache->iso_c_binding module~dtfft_nvrtc_module_cache->iso_fortran_env module~dtfft_nvrtc_module_cache->module~dtfft_config module~dtfft_nvrtc_module_cache->module~dtfft_errors module~dtfft_nvrtc_module_cache->module~dtfft_utils module~dtfft_nvrtc_module_cache->mpi_f08 module~dtfft_nvrtc_module_cache->module~dtfft_abstract_kernel module~dtfft_nvrtc_module_cache->module~dtfft_interface_cuda module~dtfft_nvrtc_module_cache->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_module_cache->module~dtfft_nvrtc_block_optimizer module~dtfft_nvrtc_module dtfft_nvrtc_module module~dtfft_nvrtc_module_cache->module~dtfft_nvrtc_module module~dtfft_nvrtc_module->iso_c_binding module~dtfft_nvrtc_module->iso_fortran_env module~dtfft_nvrtc_module->module~dtfft_config module~dtfft_nvrtc_module->module~dtfft_errors module~dtfft_nvrtc_module->module~dtfft_interface_nvtx module~dtfft_nvrtc_module->module~dtfft_parameters module~dtfft_nvrtc_module->module~dtfft_utils module~dtfft_nvrtc_module->mpi_f08 module~dtfft_nvrtc_module->module~dtfft_abstract_kernel module~dtfft_nvrtc_module->module~dtfft_interface_cuda module~dtfft_nvrtc_module->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_module->module~dtfft_interface_nvrtc module~dtfft_nvrtc_module->module~dtfft_nvrtc_block_optimizer

Used by

  • module~~dtfft_transpose_plan~~UsedByGraph module~dtfft_transpose_plan dtfft_transpose_plan module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_transpose_plan module~dtfft dtfft module~dtfft->module~dtfft_plan module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_plan

Derived Types

type, public, extends(reshape_plan_base) ::  transpose_plan

Transpose Plan class This class is a container for transposition plans

Components

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), public, allocatable :: colors(:)
logical, private :: is_z_slab

Is Z-slab optimization enabled

logical, private :: is_y_slab

Is Y-slab optimization enabled

Type-Bound Procedures

procedure, public, pass(self), non_overridable :: init ../../

Initializes reshape plan base

procedure, public, pass(self), non_overridable :: get_async_active ../../

Returns .true. if any of the plans is running asynchronously

procedure, public, pass(self), non_overridable :: get_aux_bytes ../../

Returns auxiliary buffer size

procedure, public, pass(self), non_overridable :: is_aux_needed ../../

Returns .true. if aux buffer is needed

procedure, public, pass(self), non_overridable :: get_backend ../../

Returns backend id

procedure, public, pass(self), non_overridable :: report_backends ../../

Reports backends used by each plan. Should be used only for adaptive backend

procedure, public, pass(self), non_overridable :: is_nvshmem
procedure, public, pass(self), non_overridable :: execute ../../

Executes reshape

procedure, public, pass(self), non_overridable :: execute_end ../../

Finishes asynchronous reshape

procedure, public, pass(self), non_overridable :: mem_alloc ../../

Allocates memory

procedure, public, pass(self), non_overridable :: mem_free ../../

Frees memory

procedure, public, pass(self) :: destroy ../../

Destroys reshape plan

procedure, public, pass(self) :: report_compression ../../

Reports compression statistics

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


Functions

private function create(self, platform, dims, base_comm, effort, base_dtype, base_storage, cart_comm, comms, pencils, ipencil) result(error_code)

Creates transposition plan

Arguments

Type IntentOptional 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

dtFFT planner type of 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

Return Value integer(kind=int32)

Error code

private pure function get_z_slab(self)

Returns .true. if Z-slab optimization is enabled

Arguments

Type IntentOptional Attributes Name
class(transpose_plan), intent(in) :: self

Transposition class

Return Value logical

private pure function get_y_slab(self)

Returns .true. if Y-slab optimization is enabled

Arguments

Type IntentOptional Attributes Name
class(transpose_plan), intent(in) :: self

Transposition class

Return Value logical

private function execute_many(cart_comm, create_kwargs, pencils, helper, is_z_slab, is_y_slab, effort, stream, fmodes, bmodes)

Arguments

Type IntentOptional Attributes Name
type(MPI_Comm), intent(in) :: cart_comm

3D Cartesian comm

type(create_args), intent(inout) :: create_kwargs

Create arguments

type(pencil), intent(in) :: pencils(:)

Layouts

type(backend_helper), intent(inout) :: helper
logical, intent(in) :: is_z_slab

Is Z-slab optimization enabled

logical, intent(in) :: is_y_slab

Is Y-slab optimization enabled

type(dtfft_effort_t), intent(in) :: effort

Effort level for the plan creation

type(dtfft_stream_t), intent(in) :: stream

Stream to use

type(dtfft_transpose_mode_t), intent(inout) :: fmodes(:)

Best transpose modes for forward plan

type(dtfft_transpose_mode_t), intent(inout) :: bmodes(:)

Best transpose modes for backward plan

Return Value real(kind=real32)

private function run_execute_single(create_kwargs, helper, from, to, transpose_name_id) result(elapsed_time)

Creates transpose plan for backend, specified by create_kwargs and executes it DTFFT_MEASURE_WARMUP_ITERS + DTFFT_MEASURE_ITERS times

Read more…

Arguments

Type IntentOptional Attributes Name
type(create_args), intent(inout) :: create_kwargs
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)

Return Value real(kind=real32)

Execution time [ms]


Subroutines

private subroutine autotune_grid_decomposition(platform, dims, base_comm, effort, transpose_mode, base_dtype, base_storage, stream, fmodes, bmodes, best_decomposition, backend, min_execution_time, best_backend, best_transpose_mode, fbacks, bbacks)

Runs through all possible grid decompositions and selects the best one based on the lowest average execution time

Arguments

Type IntentOptional 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

Effort level for the plan creation

type(dtfft_transpose_mode_t), intent(in) :: transpose_mode

Transpose mode to use

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

type(dtfft_transpose_mode_t), intent(inout) :: fmodes(:)

Best transpose modes for forward plan

type(dtfft_transpose_mode_t), intent(inout) :: bmodes(:)

Best transpose modes 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 DTFFT_ESTIMATE or DTFFT_MEASURE

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

type(dtfft_transpose_mode_t), intent(out), optional :: best_transpose_mode

Best transpose mode selected

type(dtfft_backend_t), intent(out), optional :: fbacks(:)

Best backends for forward plans

type(dtfft_backend_t), intent(out), optional :: bbacks(:)

Best backends for backward plans

private subroutine autotune_grid(platform, dims, base_comm, effort, transpose_mode, base_dtype, comm_dims, base_storage, stream, fmodes, bmodes, backend, best_time, best_backend, best_transpose_mode, fbacks, bbacks)

Creates cartesian grid and runs various backends on it. Returns best backend and execution time

Arguments

Type IntentOptional 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

Effort level for the plan creation

type(dtfft_transpose_mode_t), intent(in) :: transpose_mode

Transpose mode to use

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

type(dtfft_transpose_mode_t), intent(inout) :: fmodes(:)

Best transpose modes for forward plan

type(dtfft_transpose_mode_t), intent(inout) :: bmodes(:)

Best transpose modes for backward plan

type(dtfft_backend_t), intent(in), optional :: backend

GPU Backend to test. Should be passed only when effort is DTFFT_ESTIMATE or DTFFT_MEASURE

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

type(dtfft_transpose_mode_t), intent(out), optional :: best_transpose_mode

Best transpose mode selected

type(dtfft_backend_t), intent(out), optional :: fbacks(:)

Best backends for forward plans

type(dtfft_backend_t), intent(out), optional :: bbacks(:)

Best backends for backward plans

private subroutine run_autotune_backend(platform, comms, cart_comm, effort, transpose_mode, base_dtype, pencils, base_storage, stream, is_z_slab, is_y_slab, fmodes, bmodes, backend, best_time, best_backend, best_transpose_mode, fbacks, bbacks)

Runs autotune for all backends

Arguments

Type IntentOptional 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

Effort level for the plan creation

type(dtfft_transpose_mode_t), intent(in) :: transpose_mode

Transpose mode to use

type(MPI_Datatype), intent(in) :: base_dtype

Base MPI_Datatype

type(pencil), intent(in) :: pencils(:)

Layouts

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

logical, intent(in) :: is_y_slab

Is Y-slab optimization enabled

type(dtfft_transpose_mode_t), intent(inout) :: fmodes(:)

Best transpose modes for forward plan

type(dtfft_transpose_mode_t), intent(inout) :: bmodes(:)

Best transpose modes for backward plan

type(dtfft_backend_t), intent(in), optional :: backend

GPU Backend to test. Should be passed only when effort is DTFFT_ESTIMATE or DTFFT_MEASURE

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(dtfft_transpose_mode_t), intent(out), optional :: best_transpose_mode

Best transpose mode selected

type(dtfft_backend_t), intent(out), optional :: fbacks(:)
type(dtfft_backend_t), intent(out), optional :: bbacks(:)

private subroutine execute_single(base_backend, effort, create_kwargs, helper, pencils, is_z_slab, is_y_slab, fmodes, bmodes, ftimes, btimes, phase_created)

Executes autotuning over all single transpose plans and returns best transpose modes and their execution times

Arguments

Type IntentOptional Attributes Name
type(dtfft_backend_t), intent(in) :: base_backend

Backend to test

type(dtfft_effort_t), intent(in) :: effort

Effort level for the plan creation

type(create_args), intent(inout) :: create_kwargs

Create arguments

type(backend_helper), intent(inout) :: helper

Base MPI_Datatype

type(pencil), intent(in) :: pencils(:)

Pencils metadata

logical, intent(in) :: is_z_slab

Is Z-slab optimization enabled

logical, intent(in) :: is_y_slab

Is Y-slab optimization enabled

type(dtfft_transpose_mode_t), intent(inout) :: fmodes(:)

Best transpose modes for forward plan

type(dtfft_transpose_mode_t), intent(inout) :: bmodes(:)

Best transpose modes for backward plan

real(kind=real32), intent(out) :: ftimes(:)

Elapsed time for best forward plans selected in [ms]

real(kind=real32), intent(out) :: btimes(:)

Elapsed time for best backward plans selected in [ms]

logical, intent(in), optional :: phase_created

Whether caliper phase was created

private subroutine execute_single_transpose_modes(base_backend, effort, create_kwargs, helper, from, to, transpose_name_id, fmode, bmode, forward_time, backward_time)

Creates forward and backward transpose plans for backend, specified by create_kwargs, 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

Read more…

Arguments

Type IntentOptional Attributes Name
type(dtfft_backend_t), intent(in) :: base_backend
type(dtfft_effort_t), intent(in) :: effort
type(create_args), intent(inout) :: create_kwargs
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)

type(dtfft_transpose_mode_t), intent(out) :: fmode

Best forward plan ID

type(dtfft_transpose_mode_t), intent(out) :: bmode

Best backward plan ID

real(kind=real32), intent(out) :: forward_time

Forward plan execution time

real(kind=real32), intent(out) :: backward_time

Backward plan execution time

private subroutine get_permutations(ndims, dperm, cperm)

Returns data and communicator permutations for given number of dimensions

Arguments

Type IntentOptional Attributes Name
integer(kind=int8), intent(in) :: ndims

Number of dimensions

integer(kind=int8), intent(out), allocatable :: dperm(:,:)

Data permutations

integer(kind=int8), intent(out), allocatable :: cperm(:,:)

Communicator permutations

private subroutine create_pencils_and_comm(dims, old_comm, comm_dims, comm, local_comms, pencils, ipencil)

Creates cartesian communicator

Arguments

Type IntentOptional 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

private subroutine create_cart_comm(old_comm, comm_dims, comm, local_comms, ipencil)

Creates cartesian communicator

Arguments

Type IntentOptional 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