dtfft_pencil Module

This module describes private pencil and public dtfft_pencil_t classes


Uses

  • module~~dtfft_pencil~~UsesGraph module~dtfft_pencil dtfft_pencil iso_c_binding iso_c_binding module~dtfft_pencil->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_pencil->iso_fortran_env module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_pencil->module~dtfft_interface_cuda_runtime module~dtfft_parameters dtfft_parameters module~dtfft_pencil->module~dtfft_parameters module~dtfft_utils dtfft_utils module~dtfft_pencil->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_pencil->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_parameters->iso_c_binding module~dtfft_parameters->iso_fortran_env module~dtfft_parameters->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

Used by

  • module~~dtfft_pencil~~UsedByGraph module~dtfft_pencil dtfft_pencil module~dtfft dtfft module~dtfft->module~dtfft_pencil module~dtfft_plan dtfft_plan module~dtfft->module~dtfft_plan module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_abstract_backend->module~dtfft_pencil module~dtfft_abstract_executor dtfft_abstract_executor module~dtfft_abstract_executor->module~dtfft_pencil module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan module~dtfft_abstract_transpose_plan->module~dtfft_pencil module~dtfft_abstract_transpose_plan->module~dtfft_abstract_backend module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_pencil module~dtfft_api->module~dtfft_plan module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_backend_cufftmp_m->module~dtfft_pencil module~dtfft_backend_cufftmp_m->module~dtfft_abstract_backend module~dtfft_executor_fftw_m dtfft_executor_fftw_m module~dtfft_executor_fftw_m->module~dtfft_pencil module~dtfft_executor_fftw_m->module~dtfft_abstract_executor module~dtfft_plan->module~dtfft_pencil module~dtfft_plan->module~dtfft_abstract_executor module~dtfft_plan->module~dtfft_abstract_transpose_plan module~dtfft_plan->module~dtfft_executor_fftw_m 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_executor_cufft_m dtfft_executor_cufft_m module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_executor_mkl_m dtfft_executor_mkl_m module~dtfft_plan->module~dtfft_executor_mkl_m module~dtfft_executor_vkfft_m dtfft_executor_vkfft_m module~dtfft_plan->module~dtfft_executor_vkfft_m module~dtfft_transpose_handle_cuda dtfft_transpose_handle_cuda module~dtfft_transpose_handle_cuda->module~dtfft_pencil module~dtfft_transpose_handle_cuda->module~dtfft_abstract_backend module~dtfft_transpose_handle_cuda->module~dtfft_backend_cufftmp_m module~dtfft_backend_mpi dtfft_backend_mpi module~dtfft_transpose_handle_cuda->module~dtfft_backend_mpi module~dtfft_backend_nccl_m dtfft_backend_nccl_m module~dtfft_transpose_handle_cuda->module~dtfft_backend_nccl_m module~dtfft_transpose_handle_host dtfft_transpose_handle_host module~dtfft_transpose_handle_host->module~dtfft_pencil module~dtfft_transpose_plan_cuda->module~dtfft_pencil module~dtfft_transpose_plan_cuda->module~dtfft_abstract_backend module~dtfft_transpose_plan_cuda->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_cuda->module~dtfft_transpose_handle_cuda module~dtfft_transpose_plan_host->module~dtfft_pencil module~dtfft_transpose_plan_host->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_host->module~dtfft_transpose_handle_host module~dtfft_backend_mpi->module~dtfft_abstract_backend module~dtfft_backend_nccl_m->module~dtfft_abstract_backend module~dtfft_executor_cufft_m->module~dtfft_abstract_executor module~dtfft_executor_mkl_m->module~dtfft_abstract_executor module~dtfft_executor_vkfft_m->module~dtfft_abstract_executor

Derived Types

type, public ::  dtfft_pencil_t

Structure to hold pencil decomposition info

Components

Type Visibility Attributes Name Initial
integer(kind=int8), public :: dim

Aligned dimension id

integer(kind=int8), public :: ndims

Number of dimensions

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

Local starts, starting from 0 for both C and Fortran

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

Local counts of data, in elements

integer(kind=int64), public :: size

Total number of elements in a pencil

Finalizations Procedures

final :: destroy_pencil_t

type, public ::  pencil

Class that describes information about data layout

Components

Type Visibility Attributes Name Initial
integer(kind=int8), public :: aligned_dim

Position of aligned dimension. For example: X pencil aligned_dim = 1, Z pencil aligned_dim = 3

integer(kind=int8), public :: rank

Rank of buffer: 2 or 3

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

Local starts, starting from 0 for both C and Fortran

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

Local counts of data, in elements

logical, public :: is_even

Is data evenly distributed across processes

Type-Bound Procedures

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

Creates pencil

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

Destroys pencil

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

Creates public object that users can use to create own FFT backends


Functions

public pure function get_transpose_type(send, recv) result(transpose_type)

Determines transpose ID based on pencils

Arguments

Type IntentOptional Attributes Name
type(pencil), intent(in) :: send

Send pencil

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

Receive pencil

Return Value type(dtfft_transpose_t)

Transpose ID

private function make_public(self)

Creates public object that users can use to create own FFT backends

Arguments

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

Pencil

Return Value type(dtfft_pencil_t)


Subroutines

public subroutine get_local_sizes(pencils, in_starts, in_counts, out_starts, out_counts, alloc_size)

Obtain local starts and counts in real and fourier spaces

Arguments

Type IntentOptional Attributes Name
type(pencil), intent(in) :: pencils(:)

Array of pencils

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

Start indexes in real space (0-based)

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

Number of elements in real space

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

Start indexes in fourier space (0-based)

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

Number of elements in fourier space

integer(kind=int64), intent(out), optional :: alloc_size

Minimal number of elements required to execute plan

private subroutine create(self, rank, aligned_dim, counts, comms)

Creates pencil

Arguments

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

Pencil

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

Rank of buffer

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

Position of aligned dimension

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

Global counts

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

Grid communicators

private subroutine destroy(self)

Destroys pencil

Arguments

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

Pencil

private subroutine get_local_size(n_global, comm, start, count, is_even)

Computes local portions of data based on global count and position inside grid communicator

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: n_global

Global number of points

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

Grid communicator

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

Local start

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

Local count

logical, intent(out) :: is_even

Is data evenly distributed across processes

private subroutine destroy_pencil_t(self)

Destroys pencil

Arguments

Type IntentOptional Attributes Name
type(dtfft_pencil_t), intent(inout) :: self

Public pencil