transpose_plan Derived Type

type, public :: transpose_plan

Transpose Plan class This class is a container for transposition plans


Inherits

type~~transpose_plan~~InheritsGraph type~transpose_plan transpose_plan c_ptr c_ptr type~transpose_plan->c_ptr aux type~backend_helper backend_helper type~transpose_plan->type~backend_helper helper type~dtfft_backend_t dtfft_backend_t type~transpose_plan->type~dtfft_backend_t backend type~dtfft_platform_t dtfft_platform_t type~transpose_plan->type~dtfft_platform_t platform type~dtfft_stream_t dtfft_stream_t type~transpose_plan->type~dtfft_stream_t stream type~plan_t plan_t type~transpose_plan->type~plan_t plans type~backend_helper->c_ptr nccl_register MPI_Comm MPI_Comm type~backend_helper->MPI_Comm comms type~dtfft_transpose_t dtfft_transpose_t type~backend_helper->type~dtfft_transpose_t tranpose_type type~ncclcomm ncclComm type~backend_helper->type~ncclcomm nccl_comm type~pencil pencil type~backend_helper->type~pencil pencils type~dtfft_stream_t->c_ptr stream type~abstract_transpose_handle abstract_transpose_handle type~plan_t->type~abstract_transpose_handle p type~ncclcomm->c_ptr member

Inherited by

type~~transpose_plan~~InheritedByGraph type~transpose_plan transpose_plan type~dtfft_plan_t dtfft_plan_t type~dtfft_plan_t->type~transpose_plan plan type~dtfft_core_c2c dtfft_core_c2c type~dtfft_core_c2c->type~dtfft_plan_t type~dtfft_plan_r2r_t dtfft_plan_r2r_t type~dtfft_plan_r2r_t->type~dtfft_plan_t type~plan_c plan_c type~plan_c->type~dtfft_plan_t p type~dtfft_plan_c2c_t dtfft_plan_c2c_t type~dtfft_plan_c2c_t->type~dtfft_core_c2c type~dtfft_plan_r2c_t dtfft_plan_r2c_t type~dtfft_plan_r2c_t->type~dtfft_core_c2c

Components

Type Visibility Attributes Name Initial
type(dtfft_backend_t), private :: backend

Backend

type(backend_helper), private :: helper

Backend helper

logical, private :: is_z_slab

Z-slab optimization flag (for 3D transforms)

integer(kind=int64), private :: min_buffer_size

Minimal buffer size for transposition

type(dtfft_platform_t), private :: platform

Platform used for transposition

type(dtfft_stream_t), private :: stream

CUDA stream

type(c_ptr), private :: aux

Auxiliary memory

real(kind=real32), private, pointer :: paux(:)

Pointer to auxiliary memory

logical, private :: is_aux_alloc = .false.

Is auxiliary memory allocated

type(plan_t), private, allocatable :: plans(:)

Plans for each transposition


Type-Bound Procedures

procedure, public, non_overridable, pass(self) :: create

Creates transpose plan

  • 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

procedure, public, non_overridable, pass(self) :: execute

Executes transposition

  • private subroutine execute(self, in, out, transpose_type, exec_type, error_code)

    Executes transposition

    Arguments

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

    Transposition class

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

    Incoming buffer

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

    Resulting buffer

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

    Type of transpose to execute

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

    Type of execution (sync/async)

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

    Error code

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

Finishes asynchronous transposition

  • private subroutine execute_end(self, in, out, transpose_type, error_code)

    Finishes asynchronous transposition

    Arguments

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

    Transposition class

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

    Incoming buffer

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

    Resulting buffer

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

    Type of transpose

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

    Error code

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

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

  • private function get_async_active(self)

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

    Arguments

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

    Transposition class

    Return Value logical

procedure, public, non_overridable, pass(self) :: destroy

Destroys transpose plan

  • private subroutine destroy(self)

    Destroys transposition plans

    Arguments

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

    Transposition class

procedure, public, non_overridable, pass(self) :: get_aux_size

Returns auxiliary buffer size

  • private function get_aux_size(self) result(aux_size)

    Returns maximum auxiliary memory size needed by transpose plan

    Arguments

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

    Transposition class

    Return Value integer(kind=int64)

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

Returns backend id

  • private function get_backend(self)

    Returns plan GPU backend

    Arguments

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

    Transposition class

    Return Value type(dtfft_backend_t)

procedure, public, non_overridable, pass(self) :: get_z_slab

Returns .true. if Z-slab optimization is enabled

  • private 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

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

Allocates memory based on selected backend

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

    Allocates memory based on selected backend

    Arguments

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

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

Frees memory allocated with mem_alloc

  • private subroutine mem_free(self, ptr, error_code)

    Frees memory allocated with mem_alloc

    Arguments

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