dtfft_reshape_plan Module

This module describes reshape_plan class


Uses

  • module~~dtfft_reshape_plan~~UsesGraph module~dtfft_reshape_plan dtfft_reshape_plan iso_c_binding iso_c_binding module~dtfft_reshape_plan->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_reshape_plan->iso_fortran_env module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_reshape_plan->module~dtfft_abstract_backend module~dtfft_abstract_reshape_handle dtfft_abstract_reshape_handle module~dtfft_reshape_plan->module~dtfft_abstract_reshape_handle module~dtfft_config dtfft_config module~dtfft_reshape_plan->module~dtfft_config module~dtfft_errors dtfft_errors module~dtfft_reshape_plan->module~dtfft_errors module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_reshape_plan->module~dtfft_interface_nvtx module~dtfft_parameters dtfft_parameters module~dtfft_reshape_plan->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_reshape_plan->module~dtfft_pencil module~dtfft_reshape_plan_base dtfft_reshape_plan_base module~dtfft_reshape_plan->module~dtfft_reshape_plan_base module~dtfft_utils dtfft_utils module~dtfft_reshape_plan->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_reshape_plan->mpi_f08 module~dtfft_abstract_backend->iso_c_binding module~dtfft_abstract_backend->iso_fortran_env module~dtfft_abstract_backend->module~dtfft_config 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_reshape_handle->iso_fortran_env module~dtfft_abstract_reshape_handle->module~dtfft_abstract_backend module~dtfft_abstract_reshape_handle->module~dtfft_parameters module~dtfft_abstract_reshape_handle->module~dtfft_pencil module~dtfft_abstract_reshape_handle->mpi_f08 module~dtfft_config->iso_c_binding module~dtfft_config->iso_fortran_env 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_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_fortran_env 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_runtime->iso_c_binding 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->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_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->module~dtfft_utils 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_reshape_handle 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->module~dtfft_abstract_kernel module~dtfft_nvrtc_block_optimizer->module~dtfft_interface_cuda 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_utils 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_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_reshape_plan~~UsedByGraph module~dtfft_reshape_plan dtfft_reshape_plan module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_reshape_plan module~dtfft dtfft module~dtfft->module~dtfft_plan module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_plan

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private, parameter :: NEIGHBOR_GROUP = 1
integer(kind=int32), private, parameter :: STRIDED_GROUP = 2

Derived Types

type, public, extends(reshape_plan_base) ::  reshape_plan

Reshape 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), private, allocatable :: init_grid(:)
integer(kind=int32), private, allocatable :: final_grid(:)
type(MPI_Comm), private, allocatable :: comms(:)

Type-Bound Procedures

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

Functions

private function create(self, platform, ipencil, pencils, comm, local_comms, base_dtype, base_storage, effort, backend, base_init_dtype, base_init_storage, bricks, is_final_enabled) result(error_code)

Creates reshape plan

Read more…

Arguments

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

Return Value integer(kind=int32)

Error code: DTFFT_SUCCESS on success

private pure function is_backend_compatible(backend1, backend2)

Checks if two communication backends are compatible

Read more…

Arguments

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

First backend to compare

type(dtfft_backend_t), intent(in) :: backend2

Second backend to compare

Return Value logical

private pure function get_compatible(backend, platform)

Returns a compatible reshape backend for the given main backend and platform

Read more…

Arguments

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

Return Value type(dtfft_backend_t)


Subroutines

private subroutine destroy(self)

Arguments

Type IntentOptional Attributes Name
class(reshape_plan), intent(inout) :: self

private subroutine get_grid(self, dim, grid)

Returns grid decomposition for specified dimension

Arguments

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

private subroutine create_custom_comm(old_comm, new_size, group_type, new_comm)

Creates custom MPI communicator by splitting processes into groups

Read more…

Arguments

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

private subroutine create_reshape_plans(plans, backend, platform, helper, effort, force_effort, base_init_dtype, base_init_storage, base_dtype, base_storage, bricks, pencils)

Creates and allocates all reshape operation plans

Read more…

Arguments

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

private subroutine autotune_reshape_plan(platform, base_comm, comms, base_init_dtype, base_init_storage, base_dtype, base_storage, bricks, pencils, stream, buffer_size, transpose_backend, best_backend)

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) :: 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