dtfft_config Module

This module handles additional configuration dtFFT, provided by dtfft_config_t or environment variables


Uses

  • module~~dtfft_config~~UsesGraph module~dtfft_config dtfft_config iso_c_binding iso_c_binding module~dtfft_config->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_config->iso_fortran_env module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_config->module~dtfft_interface_cuda_runtime module~dtfft_parameters dtfft_parameters module~dtfft_config->module~dtfft_parameters module~dtfft_utils dtfft_utils module~dtfft_config->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_config->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_config~~UsedByGraph module~dtfft_config dtfft_config module~dtfft dtfft module~dtfft->module~dtfft_config module~dtfft_plan dtfft_plan module~dtfft->module~dtfft_plan module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan module~dtfft_abstract_transpose_plan->module~dtfft_config module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_config module~dtfft_api->module~dtfft_plan module~dtfft_executor_cufft_m dtfft_executor_cufft_m module~dtfft_executor_cufft_m->module~dtfft_config module~dtfft_executor_vkfft_m dtfft_executor_vkfft_m module~dtfft_executor_vkfft_m->module~dtfft_config module~dtfft_plan->module~dtfft_config module~dtfft_plan->module~dtfft_abstract_transpose_plan module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_plan->module~dtfft_executor_vkfft_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_transpose_plan_cuda->module~dtfft_config module~dtfft_transpose_plan_cuda->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_host->module~dtfft_abstract_transpose_plan

Variables

Type Visibility Attributes Name Initial
logical, private, save :: is_z_slab_enabled = .true.

Should we use z-slab decomposition or not

type(dtfft_platform_t), private, save :: platform = DTFFT_PLATFORM_HOST

Default platform

type(dtfft_backend_t), private, parameter :: DEFAULT_GPU_BACKEND = DTFFT_BACKEND_NCCL

Default GPU backend

type(dtfft_stream_t), private, save :: main_stream

Default dtFFT CUDA stream

type(dtfft_stream_t), private, save :: custom_stream

CUDA stream set by the user

logical, private, save :: is_stream_created = .false.

Is the default stream created?

logical, private, save :: is_custom_stream = .false.

Is the custom stream provided by the user?

logical, private, save :: is_pipelined_enabled = .true.

Should we use pipelined backends or not

logical, private, save :: is_mpi_enabled = .false.

Should we use MPI backends or not

logical, private, save :: is_nccl_enabled = .true.

Should we use NCCL backends or not

logical, private, save :: is_nvshmem_enabled = .true.

Should we use NCCL backends or not

type(dtfft_backend_t), private, save :: backend = DEFAULT_GPU_BACKEND

Default GPU backend


Interfaces

public interface dtfft_config_t

Interface to create a new configuration

  • private pure function config_constructor(enable_z_slab, platform, stream, backend, enable_mpi_backends, enable_pipelined_backends, enable_nccl_backends, enable_nvshmem_backends) result(config)

    Creates a new configuration

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in), optional :: enable_z_slab

    Should dtFFT use Z-slab optimization or not.

    type(dtfft_platform_t), intent(in), optional :: platform

    Selects platform to execute plan.

    type(dtfft_stream_t), intent(in), optional :: stream

    Main CUDA stream that will be used in dtFFT.

    type(dtfft_backend_t), intent(in), optional :: backend

    Backend that will be used by dtFFT when effort is DTFFT_ESTIMATE or DTFFT_MEASURE.

    logical, intent(in), optional :: enable_mpi_backends

    Should MPI GPU Backends be enabled when effort is DTFFT_PATIENT or not.

    logical, intent(in), optional :: enable_pipelined_backends

    Should pipelined GPU backends be enabled when effort is DTFFT_PATIENT or not.

    logical, intent(in), optional :: enable_nccl_backends

    Should NCCL Backends be enabled when effort is DTFFT_PATIENT or not.

    logical, intent(in), optional :: enable_nvshmem_backends

    Should NVSHMEM Backends be enabled when effort is DTFFT_PATIENT or not.

    Return Value type(dtfft_config_t)

    Constructed dtFFT config ready to be set by call to dtfft_set_config


Derived Types

type, public, bind(C) ::  dtfft_config_t

Type that can be used to set additional configuration parameters to dtFFT

Components

Type Visibility Attributes Name Initial
logical(kind=c_bool), public :: enable_z_slab

Should dtFFT use Z-slab optimization or not.

Read more…
type(dtfft_platform_t), public :: platform

Selects platform to execute plan.

Read more…
type(dtfft_stream_t), public :: stream

Main CUDA stream that will be used in dtFFT.

Read more…
type(dtfft_backend_t), public :: backend

Backend that will be used by dtFFT when effort is DTFFT_ESTIMATE or DTFFT_MEASURE.

Read more…
logical(kind=c_bool), public :: enable_mpi_backends

Should MPI GPU Backends be enabled when effort is DTFFT_PATIENT or not.

Read more…
logical(kind=c_bool), public :: enable_pipelined_backends

Should pipelined GPU backends be enabled when effort is DTFFT_PATIENT or not.

Read more…
logical(kind=c_bool), public :: enable_nccl_backends

Should NCCL Backends be enabled when effort is DTFFT_PATIENT or not.

Read more…
logical(kind=c_bool), public :: enable_nvshmem_backends

Should NVSHMEM Backends be enabled when effort is DTFFT_PATIENT or not.

Read more…

Constructor

Interface to create a new configuration

private pure function config_constructor (enable_z_slab, platform, stream, backend, enable_mpi_backends, enable_pipelined_backends, enable_nccl_backends, enable_nvshmem_backends)

Creates a new configuration


Functions

public pure function get_z_slab()

Whether Z-slab optimization is enabled or not

Arguments

None

Return Value logical

public pure function get_user_platform()

Returns platform set by the user or default one

Arguments

None

Return Value type(dtfft_platform_t)

public function get_user_stream() result(stream)

Returns either the custom provided by user or creates a new one

Arguments

None

Return Value type(dtfft_stream_t)

public pure function get_user_gpu_backend()

Returns GPU backend set by the user or default one

Arguments

None

Return Value type(dtfft_backend_t)

public pure function get_pipelined_enabled()

Whether pipelined backends are enabled or not

Arguments

None

Return Value logical

public pure function get_mpi_enabled()

Whether MPI backends are enabled or not

Arguments

None

Return Value logical

public pure function get_nccl_enabled()

Whether NCCL backends are enabled or not

Arguments

None

Return Value logical

public pure function get_nvshmem_enabled()

Whether nvshmem backends are enabled or not

Arguments

None

Return Value logical

private pure function config_constructor(enable_z_slab, platform, stream, backend, enable_mpi_backends, enable_pipelined_backends, enable_nccl_backends, enable_nvshmem_backends) result(config)

Creates a new configuration

Arguments

Type IntentOptional Attributes Name
logical, intent(in), optional :: enable_z_slab

Should dtFFT use Z-slab optimization or not.

type(dtfft_platform_t), intent(in), optional :: platform

Selects platform to execute plan.

type(dtfft_stream_t), intent(in), optional :: stream

Main CUDA stream that will be used in dtFFT.

type(dtfft_backend_t), intent(in), optional :: backend

Backend that will be used by dtFFT when effort is DTFFT_ESTIMATE or DTFFT_MEASURE.

logical, intent(in), optional :: enable_mpi_backends

Should MPI GPU Backends be enabled when effort is DTFFT_PATIENT or not.

logical, intent(in), optional :: enable_pipelined_backends

Should pipelined GPU backends be enabled when effort is DTFFT_PATIENT or not.

logical, intent(in), optional :: enable_nccl_backends

Should NCCL Backends be enabled when effort is DTFFT_PATIENT or not.

logical, intent(in), optional :: enable_nvshmem_backends

Should NVSHMEM Backends be enabled when effort is DTFFT_PATIENT or not.

Return Value type(dtfft_config_t)

Constructed dtFFT config ready to be set by call to dtfft_set_config


Subroutines

public pure subroutine dtfft_create_config(config) bind(C, name="dtfft_create_config_c")

Creates a new configuration with default values.

Read more…

Arguments

Type IntentOptional Attributes Name
type(dtfft_config_t), intent(out) :: config

Configuration to create

public subroutine dtfft_set_config(config, error_code)

Sets configuration parameters

Arguments

Type IntentOptional Attributes Name
type(dtfft_config_t), intent(in) :: config

Configuration to set

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

Error code

public subroutine destroy_stream()

Destroy the default stream if it was created

Arguments

None