transpose_handle_generic Derived Type

type, public, extends(abstract_transpose_handle) :: transpose_handle_generic

Generic Transpose Handle Executes transposition in 3 steps:

  • Transpose kernel execution
  • Data exchange between processes
  • Unpacking kernel execution

Inherits

type~~transpose_handle_generic~~InheritsGraph type~transpose_handle_generic transpose_handle_generic type~abstract_backend abstract_backend type~transpose_handle_generic->type~abstract_backend comm_handle type~abstract_kernel abstract_kernel type~transpose_handle_generic->type~abstract_kernel transpose_kernel, unpack_kernel type~abstract_transpose_handle abstract_transpose_handle type~transpose_handle_generic->type~abstract_transpose_handle type~abstract_backend->type~abstract_kernel unpack_kernel MPI_Comm MPI_Comm type~abstract_backend->MPI_Comm comm type~cudaevent cudaEvent type~abstract_backend->type~cudaevent execution_event, copy_event type~dtfft_backend_t dtfft_backend_t type~abstract_backend->type~dtfft_backend_t backend type~dtfft_platform_t dtfft_platform_t type~abstract_backend->type~dtfft_platform_t platform type~dtfft_stream_t dtfft_stream_t type~abstract_backend->type~dtfft_stream_t copy_stream type~kernel_type_t kernel_type_t type~abstract_kernel->type~kernel_type_t kernel_type c_ptr c_ptr type~cudaevent->c_ptr event type~dtfft_stream_t->c_ptr stream

Components

Type Visibility Attributes Name Initial
logical, private :: has_exchange = .false.

If current handle has exchanges between GPUs

logical, private :: is_pipelined = .false.

If underlying exchanges are pipelined

logical, private :: is_async_supported = .false.

If underlying backend support async execution(execute/execute_end)

class(abstract_kernel), private, allocatable :: transpose_kernel

Kernel for data transposition

class(abstract_kernel), private, allocatable :: unpack_kernel

Kernel for unpacking data

class(abstract_backend), private, allocatable :: comm_handle

Communication handle


Type-Bound Procedures

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

Creates transpose handle

  • private subroutine create(self, send, recv, base_storage, kwargs)

    Creates transpose handle

    Arguments

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

    Abstract transpose handle

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

    Send pencil

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

    Recv pencil

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

    Base storage size

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

    Additional arguments

procedure, public, pass(self) :: create_private => create

Creates Generic Transpose Handle

  • private subroutine create(self, comm, send, recv, transpose_type, base_storage, kwargs)

    Creates Generic Transpose Handle

    Arguments

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

    Generic Transpose Handle

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

    MPI Communicator

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

    Send pencil

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

    Recv pencil

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

    Type of transpose to create

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

    Base storage

    type(create_args), intent(in) :: kwargs

    Additional arguments

procedure, public, pass(self) :: execute

Executes transpose - exchange - unpack

  • private subroutine execute(self, in, out, kwargs, error_code)

    Executes transpose - exchange - unpack

    Arguments

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

    Generic Transpose Handle

    real(kind=real32), intent(inout) :: in(:)

    Send pointer

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

    Recv pointer

    type(execute_args), intent(inout) :: kwargs

    Additional arguments

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

    Error code

procedure, public, pass(self) :: execute_end

Finalizes async transpose

  • private subroutine execute_end(self, kwargs, error_code)

    Ends execution of transposition

    Arguments

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

    Generic Transpose Handle

    type(execute_args), intent(inout) :: kwargs

    Additional arguments

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

    Error code

procedure, public, pass(self) :: get_async_active

Returns if async transpose is active

procedure, public, pass(self) :: destroy

Destroys Generic Transpose Handle

  • private subroutine destroy(self)

    Destroys Generic Transpose Handle

    Arguments

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

    Generic Transpose Handle

procedure, public, pass(self) :: get_aux_size

Returns number of bytes required by aux buffer

  • private pure function get_aux_size(self)

    Returns number of bytes required by aux buffer

    Arguments

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

    Generic Transpose Handle

    Return Value integer(kind=int64)