dtfft_reshape_plan_base Module


Uses

  • module~~dtfft_reshape_plan_base~~UsesGraph module~dtfft_reshape_plan_base dtfft_reshape_plan_base iso_c_binding iso_c_binding module~dtfft_reshape_plan_base->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_reshape_plan_base->iso_fortran_env module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_reshape_plan_base->module~dtfft_abstract_backend module~dtfft_abstract_reshape_handle dtfft_abstract_reshape_handle module~dtfft_reshape_plan_base->module~dtfft_abstract_reshape_handle module~dtfft_config dtfft_config module~dtfft_reshape_plan_base->module~dtfft_config module~dtfft_errors dtfft_errors module~dtfft_reshape_plan_base->module~dtfft_errors module~dtfft_interface_cuda dtfft_interface_cuda module~dtfft_reshape_plan_base->module~dtfft_interface_cuda module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_reshape_plan_base->module~dtfft_interface_cuda_runtime module~dtfft_interface_nccl dtfft_interface_nccl 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_interface_nvtx dtfft_interface_nvtx module~dtfft_reshape_plan_base->module~dtfft_interface_nvtx module~dtfft_parameters dtfft_parameters module~dtfft_reshape_plan_base->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_reshape_plan_base->module~dtfft_pencil 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 dtfft_utils module~dtfft_reshape_plan_base->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_reshape_plan_base->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_cuda_runtime module~dtfft_abstract_backend->module~dtfft_interface_nccl 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_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_interface_cuda_runtime module~dtfft_config->module~dtfft_parameters module~dtfft_config->module~dtfft_utils module~dtfft_config->mpi_f08 module~dtfft_errors->iso_fortran_env 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_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_interface_cuda_runtime module~dtfft_pencil->module~dtfft_parameters module~dtfft_pencil->module~dtfft_utils module~dtfft_pencil->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_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_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_interface_cuda_runtime module~dtfft_backend_cufftmp_m->module~dtfft_interface_nvshmem 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_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_cuda_runtime 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_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_interface_cuda_runtime module~dtfft_backend_nccl_m->module~dtfft_interface_nccl 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_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_cuda module~dtfft_kernel_device->module~dtfft_interface_cuda_runtime 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_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_interface_cuda module~dtfft_nvrtc_block_optimizer->module~dtfft_interface_cuda_runtime 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_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_interface_cuda module~dtfft_nvrtc_module_cache->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_module_cache->module~dtfft_utils module~dtfft_nvrtc_module_cache->module~dtfft_abstract_kernel 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_cuda module~dtfft_nvrtc_module->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_module->module~dtfft_interface_nvrtc 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_nvrtc_block_optimizer

Used by

  • module~~dtfft_reshape_plan_base~~UsedByGraph module~dtfft_reshape_plan_base dtfft_reshape_plan_base module~dtfft_reshape_plan dtfft_reshape_plan module~dtfft_reshape_plan->module~dtfft_reshape_plan_base module~dtfft_transpose_plan dtfft_transpose_plan module~dtfft_transpose_plan->module~dtfft_reshape_plan_base module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_reshape_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 ::  reshape_plan_base

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

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

Functions

public pure function get_aux_bytes_generic(plans)

Returns maximum auxiliary memory size needed by plans

Arguments

Type IntentOptional Attributes Name
type(reshape_container), intent(in) :: plans(:)

Transpose plans

Return Value integer(kind=int64)

public function execute_autotune(plans, comm, backend, platform, helper, stream, buffer_size, report_space_count) result(execution_time)

Destroys array of plans

Arguments

Type IntentOptional Attributes Name
type(reshape_container), intent(inout) :: plans(:)

Allocated plans

type(MPI_Comm), intent(in) :: comm

Communicator

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

Backend to use

type(dtfft_platform_t), intent(in) :: platform

Platform used

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

Helper to use

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

Stream to use

integer(kind=int64), intent(in) :: buffer_size
integer(kind=int32), intent(in), optional :: report_space_count

Return Value real(kind=real32)

Execution time

public function report_timings(comm, elapsed_time, n_iters, space_count) result(max_time)

Arguments

Type IntentOptional Attributes Name
type(MPI_Comm), intent(in) :: comm
real(kind=real32), intent(in) :: elapsed_time
integer(kind=int32), intent(in) :: n_iters
integer(kind=int32), intent(in), optional :: space_count

Return Value real(kind=real32)

private function init(self, platform, effort) result(error_code)

Arguments

Type IntentOptional Attributes Name
class(reshape_plan_base), intent(inout) :: self
type(dtfft_platform_t), intent(in) :: platform
type(dtfft_effort_t), intent(in) :: effort

Return Value integer(kind=int32)

private function get_async_active(self)

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

Arguments

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

Transposition class

Return Value logical

private pure function get_aux_bytes(self)

Returns maximum auxiliary memory size needed by transpose plan

Arguments

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

Transposition class

Return Value integer(kind=int64)

private pure function is_aux_needed(self)

Returns true if aux is needed. false otherwise

Arguments

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

Transposition class

Return Value logical

private function get_backend(self)

Returns plan backend

Arguments

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

Transposition class

Return Value type(dtfft_backend_t)


Subroutines

public subroutine allocate_plans(plans, backend)

Allocates array of plans

Arguments

Type IntentOptional Attributes Name
type(reshape_container), intent(inout) :: plans(:)

Plans to allocate

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

Backend to use

public subroutine destroy_plans(plans)

Destroys array of plans

Arguments

Type IntentOptional Attributes Name
type(reshape_container), intent(inout) :: plans(:)

Plans to destroy

private subroutine execute(self, in, out, reshape_type, exec_type, aux, error_code)

Executes transposition

Arguments

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

Transposition class

type(c_ptr), intent(in) :: in

Incoming buffer

type(c_ptr), intent(in) :: out

Resulting buffer

integer(kind=int32), intent(in) :: reshape_type

Type of reshape to execute

type(async_exec_t), intent(in) :: exec_type

Type of execution (sync/async)

type(c_ptr), intent(in) :: aux

Optional auxiliary buffer

integer(kind=int32), intent(out), optional :: error_code

Error code

private subroutine execute_end(self, in, out, reshape_type, aux, error_code)

Finishes asynchronous reshape

Arguments

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

Reshape class

type(c_ptr), intent(in) :: in

Incoming buffer

type(c_ptr), intent(in) :: out

Resulting buffer

integer(kind=int32), intent(in) :: reshape_type

Type of reshape to execute

type(c_ptr), intent(in) :: aux
integer(kind=int32), intent(out) :: error_code

Error code

private subroutine destroy(self)

Arguments

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

private subroutine mem_alloc(self, comm, alloc_bytes, ptr, error_code)

Allocates memory based on selected backend

Arguments

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

Transposition class

type(MPI_Comm), intent(in) :: comm

MPI communicator

integer(kind=int64), intent(in) :: alloc_bytes

Number of bytes to allocate

type(c_ptr), intent(out) :: ptr

Pointer to the allocated memory

integer(kind=int32), intent(out) :: error_code

Error code

private subroutine mem_free(self, ptr, error_code)

Frees memory allocated with mem_alloc

Arguments

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

Transposition class

type(c_ptr), intent(in) :: ptr

Pointer to the memory to free

integer(kind=int32), intent(out) :: error_code

Error code

private subroutine alloc_mem(platform, helper, backend, comm, alloc_bytes, ptr, error_code)

Allocates memory based on backend

Arguments

Type IntentOptional Attributes Name
type(dtfft_platform_t), intent(in) :: platform
type(backend_helper), intent(inout) :: helper

Backend helper

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

GPU backend

type(MPI_Comm), intent(in) :: comm

MPI communicator

integer(kind=int64), intent(in) :: alloc_bytes

Number of bytes to allocate

type(c_ptr), intent(out) :: ptr

Pointer to the allocated memory

integer(kind=int32), intent(out) :: error_code

Error code

private subroutine free_mem(platform, helper, backend, ptr, error_code)

Frees memory based on backend

Arguments

Type IntentOptional Attributes Name
type(dtfft_platform_t), intent(in) :: platform
type(backend_helper), intent(inout) :: helper

Backend helper

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

GPU backend

type(c_ptr), intent(in) :: ptr

Pointer to the memory to free

integer(kind=int32), intent(out) :: error_code

Error code

private subroutine alloc_and_set_aux(platform, helper, backend, cart_comm, aux, paux, plans, is_aux_alloc)

Allocates auxiliary memory according to the backend and sets it to the plans

Arguments

Type IntentOptional Attributes Name
type(dtfft_platform_t), intent(in) :: platform
type(backend_helper), intent(inout) :: helper

Backend helper

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

GPU backend

type(MPI_Comm), intent(in) :: cart_comm

Cartesian communicator

type(c_ptr), intent(inout) :: aux

Allocatable auxiliary memory

real(kind=real32), intent(inout), pointer :: paux(:)

Pointer to auxiliary memory

type(reshape_container), intent(in) :: plans(:)
logical :: is_aux_alloc

Is auxiliary memory allocated