dtfft_transpose_handle_host Module

This module describes transpose_handle_host class


Uses

  • module~~dtfft_transpose_handle_host~~UsesGraph module~dtfft_transpose_handle_host dtfft_transpose_handle_host iso_fortran_env iso_fortran_env module~dtfft_transpose_handle_host->iso_fortran_env module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_transpose_handle_host->module~dtfft_interface_nvtx module~dtfft_parameters dtfft_parameters module~dtfft_transpose_handle_host->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_transpose_handle_host->module~dtfft_pencil mpi_f08 mpi_f08 module~dtfft_transpose_handle_host->mpi_f08 iso_c_binding iso_c_binding module~dtfft_interface_nvtx->iso_c_binding module~dtfft_utils dtfft_utils module~dtfft_interface_nvtx->module~dtfft_utils module~dtfft_parameters->iso_fortran_env module~dtfft_parameters->mpi_f08 module~dtfft_parameters->iso_c_binding module~dtfft_pencil->iso_fortran_env module~dtfft_pencil->module~dtfft_parameters module~dtfft_pencil->mpi_f08 module~dtfft_pencil->iso_c_binding module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_pencil->module~dtfft_interface_cuda_runtime module~dtfft_pencil->module~dtfft_utils module~dtfft_interface_cuda_runtime->module~dtfft_parameters module~dtfft_interface_cuda_runtime->iso_c_binding module~dtfft_interface_cuda_runtime->module~dtfft_utils module~dtfft_utils->iso_fortran_env module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08 module~dtfft_utils->iso_c_binding

Used by

  • module~~dtfft_transpose_handle_host~~UsedByGraph module~dtfft_transpose_handle_host dtfft_transpose_handle_host module~dtfft_transpose_plan_host dtfft_transpose_plan_host module~dtfft_transpose_plan_host->module~dtfft_transpose_handle_host module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_transpose_plan_host module~dtfft dtfft module~dtfft->module~dtfft_plan module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_plan

Variables

Type Visibility Attributes Name Initial
integer(kind=MPI_ADDRESS_KIND), private, parameter :: LB = 0

Lower bound for all derived datatypes


Derived Types

type, public ::  transpose_handle_host

Transposition class

Components

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

1d communicator

logical, private :: is_even

Is decomposition even

type(handle_t), private :: send

Handle to send data

type(handle_t), private :: recv

Handle to recieve data

type(MPI_Request), private :: request

Request for persistent communication

logical, private :: is_request_created

Is request created

Type-Bound Procedures

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

Initializes class

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

Performs MPI_Alltoall(w)

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

Destroys class

procedure, private, pass(self) :: create_transpose_2d ../../

Creates two-dimensional transposition datatypes

procedure, private, pass(self) :: create_transpose_XY ../../

Creates three-dimensional X –> Y, Y –> X transposition datatypes

procedure, private, pass(self) :: create_transpose_YZ ../../

Creates three-dimensional Y –> Z, Z –> Y transposition datatypes

procedure, private, pass(self) :: create_transpose_XZ ../../

Creates three-dimensional X –> Z datatype, only slab!

procedure, private, pass(self) :: create_transpose_ZX ../../

Creates three-dimensional Z –> X datatype, only slab!

type, private ::  handle_t

Transposition handle class

Components

Type Visibility Attributes Name Initial
type(MPI_Datatype), public, allocatable :: dtypes(:)

Datatypes buffer

integer(kind=int32), public, allocatable :: counts(:)

Number of datatypes (always equals 1)

integer(kind=int32), public, allocatable :: displs(:)

Displacements is bytes

Type-Bound Procedures

procedure, public, pass(self) :: create => create_handle ../../

Creates transposition handle

procedure, public, pass(self) :: destroy => destroy_handle ../../

Destroys transposition handle


Subroutines

private subroutine create_handle(self, n)

Creates transposition handle

Arguments

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

Transposition handle

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

Number of datatypes to be created

private subroutine destroy_handle(self)

Destroys transposition handle

Arguments

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

Transposition handle

private subroutine create(self, comm, send, recv, base_type, base_storage, datatype_id)

Creates transpose_handle_host class

Arguments

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

Transposition class

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

1d communicator

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

Information about send buffer

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

Information about recv buffer

type(MPI_Datatype), intent(in) :: base_type

Base MPI Datatype

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

Number of bytes needed to store single element

integer(kind=int8), intent(in) :: datatype_id

Type of datatype to use

private subroutine execute(self, send, recv)

Executes transposition

Arguments

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

Transposition class

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

Incoming buffer

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

Resulting buffer

private subroutine destroy(self)

Destroys transpose_handle_host class

Arguments

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

Transposition class

private subroutine create_transpose_2d(self, n_neighbors, i, send, send_counts, recv, recv_counts, datatype_id, base_type, base_storage)

Creates two-dimensional transposition datatypes

Arguments

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

Transposition class

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

Size of 1d comm

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

Counter

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

Information about send buffer

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

Rank i is sending this counts

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

Information about send buffer

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

Rank i is recieving this counts

integer(kind=int8), intent(in) :: datatype_id

Id of transpose plan to use

type(MPI_Datatype), intent(in) :: base_type

Base MPI_Datatype

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

Number of bytes needed to store single element

private subroutine create_transpose_XY(self, n_neighbors, i, send, send_counts, recv, recv_counts, datatype_id, base_type, base_storage)

Creates three-dimensional X –> Y, Y –> X transposition datatypes

Arguments

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

Transposition class

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

Size of 1d comm

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

Counter

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

Information about send buffer

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

Rank i is sending this counts

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

Information about send buffer

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

Rank i is recieving this counts

integer(kind=int8), intent(in) :: datatype_id

Id of transpose plan to use

type(MPI_Datatype), intent(in) :: base_type

Base MPI_Datatype

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

Number of bytes needed to store single element

private subroutine create_transpose_YZ(self, n_neighbors, i, send, send_counts, recv, recv_counts, datatype_id, base_type, base_storage)

Creates three-dimensional Y –> Z, Z –> Y transposition datatypes

Arguments

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

Transposition class

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

Size of 1d comm

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

Counter

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

Information about send buffer

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

Rank i is sending this counts

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

Information about send buffer

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

Rank i is recieving this counts

integer(kind=int8), intent(in) :: datatype_id

Id of transpose plan to use

type(MPI_Datatype), intent(in) :: base_type

Base MPI_Datatype

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

Number of bytes needed to store single element

private subroutine create_transpose_XZ(self, n_neighbors, i, send, send_counts, recv, recv_counts, datatype_id, base_type, base_storage)

Creates three-dimensional X –> Z transposition datatypes Can only be used with 3D slab decomposition when slabs are distributed in Z direction

Arguments

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

Transposition class

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

Size of 1d comm

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

Counter

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

Information about send buffer

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

Rank i is sending this counts

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

Information about send buffer

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

Rank i is recieving this counts

integer(kind=int8), intent(in) :: datatype_id

Id of transpose plan to use

type(MPI_Datatype), intent(in) :: base_type

Base MPI_Datatype

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

Number of bytes needed to store single element

private subroutine create_transpose_ZX(self, n_neighbors, i, send, send_counts, recv, recv_counts, datatype_id, base_type, base_storage)

Creates three-dimensional Z –> X transposition datatypes Can only be used with 3D slab decomposition when slabs are distributed in Z direction

Arguments

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

Transposition class

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

Size of 1d comm

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

Counter

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

Information about send buffer

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

Rank i is sending this counts

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

Information about send buffer

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

Rank i is recieving this counts

integer(kind=int8), intent(in) :: datatype_id

Id of transpose plan to use

type(MPI_Datatype), intent(in) :: base_type

Base MPI_Datatype

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

Number of bytes needed to store single element

private subroutine free_datatypes(t1, t2, t3, t4)

Frees temporary datatypes

Arguments

Type IntentOptional Attributes Name
type(MPI_Datatype), intent(inout), optional :: t1

Temporary datatype

type(MPI_Datatype), intent(inout), optional :: t2

Temporary datatype

type(MPI_Datatype), intent(inout), optional :: t3

Temporary datatype

type(MPI_Datatype), intent(inout), optional :: t4

Temporary datatype