transpose_handle_datatype Derived Type

type, public, extends(abstract_transpose_handle) :: transpose_handle_datatype

Tranpose backend that uses MPI_Ialltoall(w) with custom MPI datatypes


Inherits

type~~transpose_handle_datatype~~InheritsGraph type~transpose_handle_datatype transpose_handle_datatype MPI_Comm MPI_Comm type~transpose_handle_datatype->MPI_Comm comm MPI_Request MPI_Request type~transpose_handle_datatype->MPI_Request requests type~abstract_transpose_handle abstract_transpose_handle type~transpose_handle_datatype->type~abstract_transpose_handle type~handle_t handle_t type~transpose_handle_datatype->type~handle_t send, recv MPI_Datatype MPI_Datatype type~handle_t->MPI_Datatype dtypes

Components

Type Visibility Attributes Name Initial
type(MPI_Comm), private :: comm

1d communicator

logical, private :: is_even = .false.

Is decomposition even

logical, private :: is_active = .false.

Is async transposition active

type(handle_t), private :: send

Handle to send data

type(handle_t), private :: recv

Handle to recieve data

type(MPI_Request), private, allocatable :: requests(:)

Requests for communication

integer(kind=int32), private :: n_requests

Actual number of requests, can be less than size(requests)

logical, private :: is_request_created = .false.

Is request created


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) :: 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(abstract_transpose_handle), intent(in) :: self

    Abstract Transpose Handle

    Return Value integer(kind=int64)

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

Initializes class

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

    Creates transpose_handle_datatype class

    Arguments

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

    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

Performs MPI_Ialltoall(w)

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

    Executes transposition

    Arguments

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

    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

    Result of execution

procedure, public, pass(self) :: execute_end

Waits for MPI_Ialltoall(w) to complete

  • private subroutine execute_end(self, kwargs, error_code)

    Ends execution of transposition

    Arguments

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

    Transpose handle

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

    Additional arguments

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

    Error code

procedure, public, pass(self) :: destroy

Destroys class

  • private subroutine destroy(self)

    Destroys transpose_handle_datatype class

    Arguments

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

    Transpose handle

procedure, public, pass(self) :: get_async_active

Returns .true. if async transposition is active

  • private elemental function get_async_active(self)

    Returns if async transpose is active

    Arguments

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

    Transpose handle

    Return Value logical