All Utilities functions are located here
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private, | save | :: | is_init_called | = | .false. |
Has init_internal already been called or not |
logical, | private, | save | :: | is_log_enabled |
Should we log messages to stdout or not |
||
type(dtfft_platform_t), | private, | save | :: | platform_from_env | = | PLATFORM_NOT_SET |
Platform obtained from environ |
integer(kind=int32), | private, | save | :: | z_slab_from_env |
Should Z-slab be used if possible |
||
type(dtfft_backend_t), | private, | save | :: | backend_from_env |
Backend obtained from environ |
||
integer(kind=int32), | private, | save | :: | mpi_enabled_from_env |
Should we use MPI backends during autotune or not |
||
integer(kind=int32), | private, | save | :: | nccl_enabled_from_env |
Should we use NCCL backends during autotune or not |
||
integer(kind=int32), | private, | save | :: | nvshmem_enabled_from_env |
Should we use NVSHMEM backends during autotune or not |
||
integer(kind=int32), | private, | save | :: | pipe_enabled_from_env |
Should we use pipelined backends during autotune or not |
||
character(len=26), | private, | parameter | :: | UPPER_ALPHABET | = | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
Upper case alphabet. |
character(len=26), | private, | parameter | :: | LOWER_ALPHABET | = | 'abcdefghijklmnopqrstuvwxyz' |
Lower case alphabet. |
integer(kind=c_int), | private, | parameter | :: | RTLD_LAZY | = | 1_c_int |
Each external function reference is bound the first time the function is called. |
integer(kind=c_int), | private, | parameter | :: | RTLD_NOW | = | 2_c_int |
All external function references are bound when the library is loaded. |
Converts integer to string
Convert 8-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | n |
Integer to convert |
Resulting string
Convert 32-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | n |
Integer to convert |
Resulting string
Convert 64-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | n |
Integer to convert |
Resulting string
Obtains environment variable
Base function of obtaining dtFFT environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
Environment variable value
Obtains string environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
character(len=*), | intent(in) | :: | default |
Name of environment variable without prefix |
||
type(string), | intent(in) | :: | valid_values(:) |
List of valid variable values |
Environment variable value
Base Integer function of obtaining dtFFT environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
integer(kind=int32), | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
||
integer(kind=int32), | intent(in), | optional | :: | valid_values(:) |
List of valid values |
|
integer(kind=int32), | intent(in), | optional | :: | min_valid_value |
Mininum valid value. Usually 0 or 1 |
Obtains int8 environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
integer(kind=int8), | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
||
integer(kind=int32), | intent(in) | :: | valid_values(:) |
List of valid values |
Obtains logical environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
logical, | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
Creates string object
Creates string object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String |
Allocates memory using C11 Standard alloc_align with 16 bytes alignment
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_size_t), | value | :: | alloc_size |
Number of bytes to allocate |
||
type(c_ptr) | :: | ptr |
Pointer to allocate |
Frees memory allocated with mem_alloc_host
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | ptr |
Pointer to free |
Converts Fortran communicator to C
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_int), | value | :: | fcomm |
Fortran communicator |
Checks if pointer can be accessed from device
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | ptr |
Device pointer |
Result
Checks if pointer is NULL
Checks if pointer is NULL
Checks if pointer is NULL
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_funptr), | intent(in) | :: | ptr |
Pointer to check |
Load and link a dynamic library or bundle
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=c_char) | :: | filename(*) |
Name of the library |
|||
integer(kind=c_int), | value | :: | mode |
Options to dlopen |
Handle to the library
Get address of a symbol
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | handle |
Handle to the library |
||
character(len=c_char) | :: | name(*) |
Name of the symbol |
Address of the symbol
Close a dynamic library or bundle
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | handle |
Handle to the library |
Result of the operation
Get diagnostic information
Error message
Class used to create array of strings
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | raw |
String |
Creates string object
private function string_constructor (str) | Creates string object |
Checks if MPI is initialized and loads environment variables
Returns execution platform set by environment variable
Returns Z-slab to be used set by environment variable
Returns GPU backend to use set by environment variable
Returns usage of MPI Backends during autotune set by environment variable
Returns usage of NCCL Backends during autotune set by environment variable
Returns usage of NVSHMEM Backends during autotune set by environment variable
Returns usage of Pipelined Backends during autotune set by environment variable
Obtains number of iterations from environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | is_warmup |
Warmup variable flag |
Obtains datatype id from environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
Returns the value of the log_enabled variable
Value of the log_enabled variable
Dynamically loads library
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of library to load |
Loaded handle
Dynamically loads symbol from library
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(in) | :: | handle |
Loaded handle |
||
character(len=*), | intent(in) | :: | name |
Name of function to load |
Function pointer
Dynamically loads library and its symbols
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of library to load |
||
type(string), | intent(in) | :: | symbol_names(:) |
Names of functions to load |
||
type(c_ptr), | intent(out) | :: | handle |
Loaded handle |
||
type(c_funptr), | intent(out) | :: | symbols(:) |
Function pointers |
Error code
Convert double to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | n |
Double to convert |
Resulting string
Get the inverse R2R kind of transform for the given R2R kind
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dtfft_r2r_kind_t), | intent(in) | :: | r2r_kind |
R2R kind |
Checks if pointer is NULL
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(in) | :: | ptr |
Pointer to check |
Checks if two pointer are the same
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(in) | :: | ptr1 |
First pointer |
||
type(c_ptr), | intent(in) | :: | ptr2 |
Second pointer |
Count the number of unique elements in the array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | x(:) |
Array of integers |
Base function of obtaining dtFFT environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
Environment variable value
Obtains string environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
character(len=*), | intent(in) | :: | default |
Name of environment variable without prefix |
||
type(string), | intent(in) | :: | valid_values(:) |
List of valid variable values |
Environment variable value
Base Integer function of obtaining dtFFT environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
integer(kind=int32), | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
||
integer(kind=int32), | intent(in), | optional | :: | valid_values(:) |
List of valid values |
|
integer(kind=int32), | intent(in), | optional | :: | min_valid_value |
Mininum valid value. Usually 0 or 1 |
Obtains int8 environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
integer(kind=int8), | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
||
integer(kind=int32), | intent(in) | :: | valid_values(:) |
List of valid values |
Obtains logical environment variable
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of environment variable without prefix |
||
logical, | intent(in) | :: | default |
Default value in case env is not set or it has wrong value |
Convert 8-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | n |
Integer to convert |
Resulting string
Convert 32-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | n |
Integer to convert |
Resulting string
Convert 64-bit integer to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | n |
Integer to convert |
Resulting string
Checks if pointer is NULL
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_funptr), | intent(in) | :: | ptr |
Pointer to check |
Convert Fortran string to C string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fstring |
Fortran string |
||
character(kind=c_char, len=1), | intent(inout) | :: | cstring(*) |
C string |
||
integer(kind=int64), | intent(out), | optional | :: | string_size |
Size of the C string |
Convert C string to Fortran string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr) | :: | cstring |
C string |
|||
character(len=:), | allocatable | :: | string |
Fortran string |
Convert Fortran string to C allocatable string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fstring |
Fortran string |
||
character(kind=c_char, len=1), | intent(out), | allocatable | :: | cstring(:) |
C string |
|
integer(kind=int64), | intent(out), | optional | :: | string_size |
Size of the C string |
Unloads library
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(in) | :: | handle |
Loaded handle |
Write message to the specified unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | unit |
Unit number |
||
character(len=*), | intent(in) | :: | message |
Message to write |
||
character(len=*), | intent(in), | optional | :: | prefix |
Prefix to the message |
Writes error message to the error unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | message |
Message to write |