dtfft_abstract_transpose_plan Module

This module describes Abstraction for all Tranpose plans: abstract_transpose_plan


Uses

  • module~~dtfft_abstract_transpose_plan~~UsesGraph module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan iso_c_binding iso_c_binding module~dtfft_abstract_transpose_plan->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_abstract_transpose_plan->iso_fortran_env module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_abstract_transpose_plan->module~dtfft_abstract_backend module~dtfft_config dtfft_config module~dtfft_abstract_transpose_plan->module~dtfft_config module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_abstract_transpose_plan->module~dtfft_interface_cuda_runtime module~dtfft_interface_nccl dtfft_interface_nccl module~dtfft_abstract_transpose_plan->module~dtfft_interface_nccl module~dtfft_interface_nvshmem dtfft_interface_nvshmem module~dtfft_abstract_transpose_plan->module~dtfft_interface_nvshmem module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_abstract_transpose_plan->module~dtfft_interface_nvtx module~dtfft_nvrtc_kernel dtfft_nvrtc_kernel module~dtfft_abstract_transpose_plan->module~dtfft_nvrtc_kernel module~dtfft_parameters dtfft_parameters module~dtfft_abstract_transpose_plan->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_abstract_transpose_plan->module~dtfft_pencil module~dtfft_utils dtfft_utils module~dtfft_abstract_transpose_plan->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_abstract_transpose_plan->mpi_f08 module~dtfft_abstract_backend->iso_c_binding module~dtfft_abstract_backend->iso_fortran_env module~dtfft_abstract_backend->module~dtfft_interface_cuda_runtime module~dtfft_abstract_backend->module~dtfft_interface_nccl module~dtfft_abstract_backend->module~dtfft_nvrtc_kernel 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_config->iso_c_binding module~dtfft_config->iso_fortran_env 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_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_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_nvtx->iso_c_binding module~dtfft_interface_nvtx->module~dtfft_utils module~dtfft_nvrtc_kernel->iso_c_binding module~dtfft_nvrtc_kernel->iso_fortran_env module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_kernel->module~dtfft_interface_nvtx module~dtfft_nvrtc_kernel->module~dtfft_parameters module~dtfft_nvrtc_kernel->module~dtfft_utils module~dtfft_nvrtc_kernel->mpi_f08 module~dtfft_interface_cuda dtfft_interface_cuda module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda module~dtfft_interface_nvrtc dtfft_interface_nvrtc module~dtfft_nvrtc_kernel->module~dtfft_interface_nvrtc 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_interface_cuda_runtime module~dtfft_pencil->module~dtfft_parameters module~dtfft_pencil->module~dtfft_utils module~dtfft_pencil->mpi_f08 module~dtfft_utils->iso_c_binding module~dtfft_utils->iso_fortran_env module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08 module~dtfft_interface_cuda->iso_c_binding module~dtfft_interface_cuda->iso_fortran_env module~dtfft_interface_cuda->module~dtfft_interface_cuda_runtime module~dtfft_interface_cuda->module~dtfft_parameters module~dtfft_interface_cuda->module~dtfft_utils module~dtfft_interface_nvrtc->iso_c_binding module~dtfft_interface_nvrtc->iso_fortran_env module~dtfft_interface_nvrtc->module~dtfft_interface_cuda_runtime module~dtfft_interface_nvrtc->module~dtfft_parameters module~dtfft_interface_nvrtc->module~dtfft_utils

Used by

  • module~~dtfft_abstract_transpose_plan~~UsedByGraph module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_cuda dtfft_transpose_plan_cuda module~dtfft_plan->module~dtfft_transpose_plan_cuda module~dtfft_transpose_plan_host dtfft_transpose_plan_host module~dtfft_plan->module~dtfft_transpose_plan_host module~dtfft_transpose_plan_cuda->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_host->module~dtfft_abstract_transpose_plan module~dtfft dtfft module~dtfft->module~dtfft_plan module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_plan

Abstract Interfaces

abstract interface

  • private function create_interface(self, dims, transposed_dims, base_comm, comm_dims, effort, base_dtype, base_storage, is_custom_cart_comm, cart_comm, comms, pencils) result(error_code)

    Creates transposition plans

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_transpose_plan), 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 MPI communicator

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

    Dims in cartesian 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

    logical, intent(in) :: is_custom_cart_comm

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

    Data distributing meta

    Return Value integer(kind=int32)

    Error code

abstract interface

  • private subroutine execute_interface(self, in, out, transpose_type)

    Executes single transposition

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_transpose_plan), 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

abstract interface

  • private subroutine destroy_interface(self)

    Destroys transposition plans

    Arguments

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

    Transposition class


Derived Types

type, public, abstract ::  abstract_transpose_plan

The most Abstract Transpose Plan

Components

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-Bound Procedures

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

Create transposition plan

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

Executes transposition

procedure(create_interface), public, deferred, pass(self) :: create_private ../../

Creates overriding class

procedure(execute_interface), public, deferred, pass(self) :: execute_private ../../

Executes overriding class

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

Destroys overriding class

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


Functions

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

Creates transposition plans

Arguments

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

Transposition class

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

Return Value integer(kind=int32)

Error code

private function get_backend(self)

Returns plan GPU backend

Arguments

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

Transposition class

Return Value type(dtfft_backend_t)


Subroutines

public subroutine alloc_mem(helper, backend, comm, alloc_bytes, ptr, error_code)

Allocates memory based on backend

Arguments

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

public subroutine free_mem(helper, backend, ptr, error_code)

Frees memory based on backend

Arguments

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

public subroutine create_cart_comm(old_comm, comm_dims, comm, local_comms)

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

private subroutine execute(self, in, out, transpose_type)

Executes single transposition

Arguments

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

Transposition class

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

Incoming pointer

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

Result pointer

type(dtfft_transpose_t), intent(in) :: transpose_type

Type of transpose

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

Allocates memory based on selected backend

Arguments

Type IntentOptional Attributes Name
class(abstract_transpose_plan), 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(abstract_transpose_plan), 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