Configuration module for dtFFT. It handles both runtime (environment variables) and compile-time (dtfft_config_t) configurations.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | protected | :: | is_init_called | = | .false. |
Has init_internal already been called or not |
|
| integer(kind=int32), | protected | :: | log_enabled_from_env | = | VARIABLE_NOT_SET |
Should we log messages to stdout or not |
|
| type(dtfft_platform_t), | protected | :: | platform_from_env | = | PLATFORM_NOT_SET |
Platform obtained from environ |
|
| integer(kind=int32), | protected | :: | z_slab_from_env | = | VARIABLE_NOT_SET |
Should Z-slab be used if possible |
|
| integer(kind=int32), | protected | :: | y_slab_from_env | = | VARIABLE_NOT_SET |
Should Y-slab be used if possible |
|
| integer(kind=int32), | protected | :: | n_measure_warmup_iters_from_env | = | VARIABLE_NOT_SET |
Number of warmup iterations for measurements |
|
| integer(kind=int32), | protected | :: | n_measure_iters_from_env | = | VARIABLE_NOT_SET |
Number of measurement iterations |
|
| logical, | protected | :: | is_log_enabled | = | .false. |
Should we print additional information during plan creation |
|
| logical, | protected | :: | is_z_slab_enabled | = | .true. |
Should we use Z-slab optimization or not |
|
| logical, | protected | :: | is_y_slab_enabled | = | .false. |
Should we use Y-slab optimization or not |
|
| type(dtfft_platform_t), | protected | :: | platform | = | DTFFT_PLATFORM_HOST |
Default platform |
|
| integer(kind=int32), | protected | :: | n_measure_warmup_iters | = | 2 |
Number of warmup iterations for measurements |
|
| integer(kind=int32), | protected | :: | n_measure_iters | = | 5 |
Number of measurement iterations |
|
| type(dtfft_backend_t), | protected | :: | backend_from_env | = | DTFFT_BACKEND_NONE |
Backend obtained from environ |
|
| type(dtfft_backend_t), | protected | :: | reshape_backend_from_env | = | DTFFT_BACKEND_NONE |
Reshape backend obtained from environ |
|
| integer(kind=int32), | protected | :: | datatype_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use MPI Datatype backend during autotune or not |
|
| integer(kind=int32), | protected | :: | mpi_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use MPI backends during autotune or not |
|
| integer(kind=int32), | protected | :: | pipelined_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use pipelined backends during autotune or not |
|
| integer(kind=int32), | protected | :: | kernel_autotune_enabled_from_env | = | VARIABLE_NOT_SET |
Should we enable kernel autotune or not |
|
| integer(kind=int32), | protected | :: | fourier_reshape_enabled_from_env | = | VARIABLE_NOT_SET |
Should we enable fourier space reshape or not |
|
| integer(kind=int32), | protected | :: | fused_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use fused backends during autotune or not |
|
| type(dtfft_transpose_mode_t), | protected | :: | transpose_mode_from_env | = | TRANSPOSE_MODE_NOT_SET |
Transpose mode obtained from environ |
|
| type(dtfft_access_mode_t), | protected | :: | access_mode_from_env | = | ACCESS_MODE_NOT_SET |
Access mode obtained from environ |
|
| integer(kind=int32), | protected | :: | compression_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use compressed backends during autotune or not |
|
| integer(kind=int32), | protected | :: | nccl_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use NCCL backends during autotune or not |
|
| integer(kind=int32), | protected | :: | nvshmem_enabled_from_env | = | VARIABLE_NOT_SET |
Should we use NVSHMEM backends during autotune or not |
|
| type(dtfft_stream_t), | protected | :: | main_stream | = | NULL_STREAM |
Default dtFFT CUDA stream |
|
| type(dtfft_stream_t), | protected | :: | custom_stream | = | NULL_STREAM |
CUDA stream set by the user |
|
| logical, | protected | :: | is_stream_created | = | .false. |
Is the default stream created? |
|
| logical, | protected | :: | is_custom_stream | = | .false. |
Is the custom stream provided by the user? |
|
| logical, | protected | :: | is_datatype_enabled | = | .true. |
Should we use MPI Datatype backend or not |
|
| logical, | protected | :: | is_pipelined_enabled | = | .true. |
Should we use pipelined backends or not |
|
| logical, | protected | :: | is_mpi_enabled | = | .false. |
Should we use MPI backends or not |
|
| logical, | protected | :: | is_nccl_enabled | = | .true. |
Should we use NCCL backends or not |
|
| logical, | protected | :: | is_nvshmem_enabled | = | .true. |
Should we use NCCL backends or not |
|
| logical, | protected | :: | is_kernel_autotune_enabled | = | .false. |
Should we use kernel autotune or not |
|
| logical, | protected | :: | is_fourier_reshape_enabled | = | .false. |
Should we use reshape in fourier space or not |
|
| logical, | protected | :: | is_rma_enabled | = | .true. |
Should we use RMA backends or not |
|
| logical, | protected | :: | is_fused_enabled | = | .true. |
Should we use fused backends or not |
|
| type(dtfft_backend_t), | protected | :: | backend | = | DEFAULT_BACKEND |
Default backend |
|
| type(dtfft_backend_t), | protected | :: | reshape_backend | = | DEFAULT_BACKEND |
Default reshape backend |
|
| type(dtfft_transpose_mode_t), | protected | :: | transpose_mode | = | DTFFT_TRANSPOSE_MODE_PACK |
Default transpose mode |
|
| type(dtfft_access_mode_t), | protected | :: | access_mode | = | DTFFT_ACCESS_MODE_WRITE |
Default access mode |
|
| logical, | protected | :: | is_compression_enabled | = | .false. |
Should we use compressed backends or not during autotuning |
|
| type(dtfft_compression_config_t), | protected | :: | config_transpose | = | DEFAULT_COMPRESSION_CONFIG |
Configuration for compression during transpositions |
|
| type(dtfft_compression_config_t), | protected | :: | config_reshape | = | DEFAULT_COMPRESSION_CONFIG |
Configuration for compression during reshape operations |
|
| type(dtfft_backend_t), | private, | parameter | :: | DEFAULT_BACKEND | = | DTFFT_BACKEND_NONE |
Default backend when cuda is enabled |
Interface to create a new configuration
Creates a new configuration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | enable_log |
Should dtFFT print additional information during plan creation or not. |
|
| logical, | intent(in), | optional | :: | enable_z_slab |
Should dtFFT use Z-slab optimization or not. |
|
| logical, | intent(in), | optional | :: | enable_y_slab |
Should dtFFT use Y-slab optimization or not. |
|
| integer(kind=int32), | intent(in), | optional | :: | n_measure_warmup_iters |
Number of warmup iterations for measurements |
|
| integer(kind=int32), | intent(in), | optional | :: | n_measure_iters |
Number of measurement iterations |
|
| 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 |
|
| type(dtfft_backend_t), | intent(in), | optional | :: | reshape_backend |
Backend that will be used by dtFFT for data reshaping from bricks to pencils and vice versa when |
|
| logical, | intent(in), | optional | :: | enable_datatype_backend |
Should |
|
| logical, | intent(in), | optional | :: | enable_mpi_backends |
Should MPI Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_pipelined_backends |
Should pipelined backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_rma_backends |
Should RMA backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_fused_backends |
Should fused backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_nccl_backends |
Should NCCL Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_nvshmem_backends |
Should NVSHMEM Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_kernel_autotune |
Should dtFFT try to autotune transpose/packing/unpacking kernels size during autotune process or not. |
|
| logical, | intent(in), | optional | :: | enable_fourier_reshape |
Should dtFFT execute reshapes from pencils to bricks and vice versa in Fourier space during calls to |
|
| type(dtfft_transpose_mode_t), | intent(in), | optional | :: | transpose_mode |
Specifies at which stage the local transposition is performed during global exchange. |
|
| type(dtfft_access_mode_t), | intent(in), | optional | :: | access_mode |
Specifies the memory access pattern (optimization target) for local transposition in Generic backends. |
|
| logical, | intent(in), | optional | :: | enable_compressed_backends |
Should compressed backends be enabled when |
|
| type(dtfft_compression_config_t), | intent(in), | optional | :: | compression_config_transpose |
Options for compression approach during transpositions |
|
| type(dtfft_compression_config_t), | intent(in), | optional | :: | compression_config_reshape |
Options for compression approach during transpositions |
Constructed dtFFT config ready to be set by call to dtfft_set_config
Returns value from configuration unless environment variable is set
Returns value from configuration unless environment variable is set
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | from_conf |
Value from configuration |
||
| integer(kind=int32), | intent(in) | :: | from_env |
Value from environment variable |
Returns value from configuration unless environment variable is set
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | from_conf |
Value from configuration |
||
| integer(kind=int32), | intent(in) | :: | from_env |
Value from environment variable |
Type that can be used to set additional configuration parameters to dtFFT
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical(kind=c_bool), | public | :: | enable_log |
Should dtFFT print additional information during plan creation or not. |
|||
| logical(kind=c_bool), | public | :: | enable_z_slab |
Should dtFFT use Z-slab optimization or not. |
|||
| logical(kind=c_bool), | public | :: | enable_y_slab |
Should dtFFT use Y-slab optimization or not. |
|||
| integer(kind=c_int32_t), | public | :: | n_measure_warmup_iters |
Number of warmup iterations to execute during backend and kernel autotuning when effort level is |
|||
| integer(kind=c_int32_t), | public | :: | n_measure_iters |
Number of iterations to execute during backend and kernel autotuning when effort level is |
|||
| type(dtfft_platform_t), | public | :: | platform |
Selects platform to execute plan. |
|||
| type(dtfft_stream_t), | public | :: | stream |
Main CUDA stream that will be used in dtFFT. |
|||
| type(dtfft_backend_t), | public | :: | backend |
Backend that will be used by dtFFT when |
|||
| type(dtfft_backend_t), | public | :: | reshape_backend |
Backend that will be used by dtFFT for data reshaping from bricks to pencils and vice versa when |
|||
| logical(kind=c_bool), | public | :: | enable_datatype_backend |
Should |
|||
| logical(kind=c_bool), | public | :: | enable_mpi_backends |
Should MPI Backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_pipelined_backends |
Should pipelined backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_rma_backends |
Should RMA backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_fused_backends |
Should fused backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_nccl_backends |
Should NCCL Backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_nvshmem_backends |
Should NVSHMEM Backends be enabled when |
|||
| logical(kind=c_bool), | public | :: | enable_kernel_autotune |
Should dtFFT try to optimize kernel launch parameters during plan creation when |
|||
| logical(kind=c_bool), | public | :: | enable_fourier_reshape |
Should dtFFT execute reshapes from pencils to bricks and vice versa in Fourier space during calls to |
|||
| type(dtfft_transpose_mode_t), | public | :: | transpose_mode |
Specifies at which stage the local transposition is performed during global exchange. |
|||
| type(dtfft_access_mode_t), | public | :: | access_mode |
Specifies the memory access pattern (optimization target) for local transposition. |
|||
| logical(kind=c_bool), | public | :: | enable_compressed_backends |
Should compressed backends be enabled when |
|||
| type(dtfft_compression_config_t), | public | :: | compression_config_transpose |
Options for compression approach during transpositions |
|||
| type(dtfft_compression_config_t), | public | :: | compression_config_reshape |
Options for compression approach during reshape operations |
Interface to create a new configuration
| private pure function config_constructor (enable_log, enable_z_slab, enable_y_slab, n_measure_warmup_iters, n_measure_iters, platform, stream, backend, reshape_backend, enable_datatype_backend, enable_mpi_backends, enable_pipelined_backends, enable_rma_backends, enable_fused_backends, enable_nccl_backends, enable_nvshmem_backends, enable_kernel_autotune, enable_fourier_reshape, transpose_mode, access_mode, enable_compressed_backends, compression_config_transpose, compression_config_reshape) | Creates a new configuration |
Checks if MPI is initialized and loads environment variables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | intent(in) | :: | back |
Whether logging is enabled or not
Result flag
Whether Z-slab optimization is enabled or not
Result flag
Whether Y-slab optimization is enabled or not
Result flag
Returns the number of warmup iterations
Result
Returns the number of measurement iterations
Result
Returns either the custom provided by user or creates a new one
Returns reshape backend set by the user or default one
Whether MPI Datatype backend is enabled or not
Result flag
Whether pipelined backends are enabled or not
Result flag
Whether RMA backends are enabled or not
Result flag
Whether fused backends are enabled or not
Result flag
Whether MPI backends are enabled or not
Result flag
Whether NCCL backends are enabled or not
Result flag
Whether nvshmem backends are enabled or not
Result flag
Whether kernel optimization is enabled or not
Result flag
Whether reshape in Fourier space is enabled or not
Result flag
Returns transpose mode set by the user or default one
Result
Returns access mode set by the user or default one
Result
Whether compression is enabled or not
Result flag
Returns compression config for transposes
Result
Returns compression config for reshapes
Result
Returns backend or reshape backend obtained from environment variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Name of the environment variable |
Creates a new configuration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | enable_log |
Should dtFFT print additional information during plan creation or not. |
|
| logical, | intent(in), | optional | :: | enable_z_slab |
Should dtFFT use Z-slab optimization or not. |
|
| logical, | intent(in), | optional | :: | enable_y_slab |
Should dtFFT use Y-slab optimization or not. |
|
| integer(kind=int32), | intent(in), | optional | :: | n_measure_warmup_iters |
Number of warmup iterations for measurements |
|
| integer(kind=int32), | intent(in), | optional | :: | n_measure_iters |
Number of measurement iterations |
|
| 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 |
|
| type(dtfft_backend_t), | intent(in), | optional | :: | reshape_backend |
Backend that will be used by dtFFT for data reshaping from bricks to pencils and vice versa when |
|
| logical, | intent(in), | optional | :: | enable_datatype_backend |
Should |
|
| logical, | intent(in), | optional | :: | enable_mpi_backends |
Should MPI Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_pipelined_backends |
Should pipelined backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_rma_backends |
Should RMA backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_fused_backends |
Should fused backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_nccl_backends |
Should NCCL Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_nvshmem_backends |
Should NVSHMEM Backends be enabled when |
|
| logical, | intent(in), | optional | :: | enable_kernel_autotune |
Should dtFFT try to autotune transpose/packing/unpacking kernels size during autotune process or not. |
|
| logical, | intent(in), | optional | :: | enable_fourier_reshape |
Should dtFFT execute reshapes from pencils to bricks and vice versa in Fourier space during calls to |
|
| type(dtfft_transpose_mode_t), | intent(in), | optional | :: | transpose_mode |
Specifies at which stage the local transposition is performed during global exchange. |
|
| type(dtfft_access_mode_t), | intent(in), | optional | :: | access_mode |
Specifies the memory access pattern (optimization target) for local transposition in Generic backends. |
|
| logical, | intent(in), | optional | :: | enable_compressed_backends |
Should compressed backends be enabled when |
|
| type(dtfft_compression_config_t), | intent(in), | optional | :: | compression_config_transpose |
Options for compression approach during transpositions |
|
| type(dtfft_compression_config_t), | intent(in), | optional | :: | compression_config_reshape |
Options for compression approach during transpositions |
Constructed dtFFT config ready to be set by call to dtfft_set_config
Returns value from configuration unless environment variable is set
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | from_conf |
Value from configuration |
||
| integer(kind=int32), | intent(in) | :: | from_env |
Value from environment variable |
Returns value from configuration unless environment variable is set
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | from_conf |
Value from configuration |
||
| integer(kind=int32), | intent(in) | :: | from_env |
Value from environment variable |
Creates a new configuration and sets default values.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_config_t), | intent(out) | :: | config |
Configuration to create |
Sets configuration parameters
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_config_t), | intent(in) | :: | config |
Configuration to set |
||
| integer(kind=int32), | intent(out), | optional | :: | error_code |
Error code |
Destroy the default stream if it was created