dtfft_abstract_compressor Module

Abstract base class for compression implementations abstract_compressor


Uses

  • module~~dtfft_abstract_compressor~~UsesGraph module~dtfft_abstract_compressor dtfft_abstract_compressor iso_c_binding iso_c_binding module~dtfft_abstract_compressor->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_abstract_compressor->iso_fortran_env module~dtfft_errors dtfft_errors module~dtfft_abstract_compressor->module~dtfft_errors module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_abstract_compressor->module~dtfft_interface_nvtx module~dtfft_parameters dtfft_parameters module~dtfft_abstract_compressor->module~dtfft_parameters module~dtfft_utils dtfft_utils module~dtfft_abstract_compressor->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_abstract_compressor->mpi_f08 module~dtfft_errors->iso_fortran_env module~dtfft_interface_nvtx->iso_c_binding module~dtfft_interface_nvtx->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_errors module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08

Used by

  • module~~dtfft_abstract_compressor~~UsedByGraph module~dtfft_abstract_compressor dtfft_abstract_compressor module~dtfft dtfft module~dtfft->module~dtfft_abstract_compressor module~dtfft_config dtfft_config module~dtfft->module~dtfft_config module~dtfft_pencil dtfft_pencil module~dtfft->module~dtfft_pencil module~dtfft_plan dtfft_plan module~dtfft->module~dtfft_plan module~dtfft_abstract_kernel dtfft_abstract_kernel module~dtfft_abstract_kernel->module~dtfft_abstract_compressor module~dtfft_abstract_kernel->module~dtfft_config module~dtfft_abstract_reshape_handle dtfft_abstract_reshape_handle module~dtfft_abstract_reshape_handle->module~dtfft_abstract_compressor module~dtfft_abstract_reshape_handle->module~dtfft_config module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_abstract_reshape_handle->module~dtfft_abstract_backend module~dtfft_abstract_reshape_handle->module~dtfft_pencil module~dtfft_compressor_zfp dtfft_compressor_zfp module~dtfft_compressor_zfp->module~dtfft_abstract_compressor module~dtfft_compressor_zfp->module~dtfft_config module~dtfft_config->module~dtfft_abstract_compressor module~dtfft_reshape_handle_generic dtfft_reshape_handle_generic module~dtfft_reshape_handle_generic->module~dtfft_abstract_compressor module~dtfft_reshape_handle_generic->module~dtfft_abstract_kernel module~dtfft_reshape_handle_generic->module~dtfft_abstract_reshape_handle module~dtfft_reshape_handle_generic->module~dtfft_config module~dtfft_reshape_handle_generic->module~dtfft_abstract_backend module~dtfft_kernel_device dtfft_kernel_device module~dtfft_reshape_handle_generic->module~dtfft_kernel_device module~dtfft_kernel_host dtfft_kernel_host module~dtfft_reshape_handle_generic->module~dtfft_kernel_host module~dtfft_reshape_handle_generic->module~dtfft_pencil module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_reshape_handle_generic->module~dtfft_backend_cufftmp_m module~dtfft_backend_mpi dtfft_backend_mpi module~dtfft_reshape_handle_generic->module~dtfft_backend_mpi module~dtfft_backend_nccl_m dtfft_backend_nccl_m module~dtfft_reshape_handle_generic->module~dtfft_backend_nccl_m module~dtfft_reshape_plan dtfft_reshape_plan module~dtfft_reshape_plan->module~dtfft_abstract_compressor module~dtfft_reshape_plan->module~dtfft_abstract_reshape_handle module~dtfft_reshape_plan->module~dtfft_config module~dtfft_reshape_plan_base dtfft_reshape_plan_base module~dtfft_reshape_plan->module~dtfft_reshape_plan_base module~dtfft_reshape_plan->module~dtfft_abstract_backend module~dtfft_reshape_plan->module~dtfft_pencil module~dtfft_reshape_plan_base->module~dtfft_abstract_compressor module~dtfft_reshape_plan_base->module~dtfft_abstract_reshape_handle module~dtfft_reshape_plan_base->module~dtfft_config module~dtfft_reshape_plan_base->module~dtfft_reshape_handle_generic module~dtfft_reshape_plan_base->module~dtfft_abstract_backend module~dtfft_reshape_plan_base->module~dtfft_pencil module~dtfft_reshape_handle_datatype dtfft_reshape_handle_datatype module~dtfft_reshape_plan_base->module~dtfft_reshape_handle_datatype module~dtfft_transpose_plan dtfft_transpose_plan module~dtfft_transpose_plan->module~dtfft_abstract_compressor module~dtfft_transpose_plan->module~dtfft_abstract_reshape_handle module~dtfft_transpose_plan->module~dtfft_config module~dtfft_transpose_plan->module~dtfft_reshape_plan_base module~dtfft_transpose_plan->module~dtfft_abstract_backend module~dtfft_transpose_plan->module~dtfft_pencil program~test_compression test_compression program~test_compression->module~dtfft_abstract_compressor program~test_compression->module~dtfft_abstract_kernel program~test_compression->module~dtfft_compressor_zfp program~test_compression->module~dtfft_config program~test_compression->module~dtfft_kernel_host module~dtfft_abstract_backend->module~dtfft_abstract_kernel module~dtfft_abstract_backend->module~dtfft_pencil module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_config module~dtfft_api->module~dtfft_pencil 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_abstract_executor dtfft_abstract_executor module~dtfft_executor_cufft_m->module~dtfft_abstract_executor module~dtfft_executor_vkfft_m dtfft_executor_vkfft_m module~dtfft_executor_vkfft_m->module~dtfft_config module~dtfft_executor_vkfft_m->module~dtfft_abstract_executor module~dtfft_kernel_device->module~dtfft_abstract_kernel module~dtfft_kernel_device->module~dtfft_config module~dtfft_nvrtc_block_optimizer dtfft_nvrtc_block_optimizer module~dtfft_kernel_device->module~dtfft_nvrtc_block_optimizer module~dtfft_nvrtc_module_cache dtfft_nvrtc_module_cache module~dtfft_kernel_device->module~dtfft_nvrtc_module_cache module~dtfft_kernel_host->module~dtfft_abstract_kernel module~dtfft_kernel_host->module~dtfft_config module~dtfft_nvrtc_block_optimizer->module~dtfft_abstract_kernel module~dtfft_nvrtc_block_optimizer->module~dtfft_config module~dtfft_nvrtc_module dtfft_nvrtc_module module~dtfft_nvrtc_module->module~dtfft_abstract_kernel module~dtfft_nvrtc_module->module~dtfft_config module~dtfft_nvrtc_module->module~dtfft_nvrtc_block_optimizer module~dtfft_nvrtc_module_cache->module~dtfft_abstract_kernel module~dtfft_nvrtc_module_cache->module~dtfft_config module~dtfft_nvrtc_module_cache->module~dtfft_nvrtc_block_optimizer module~dtfft_nvrtc_module_cache->module~dtfft_nvrtc_module module~dtfft_pencil->module~dtfft_config module~dtfft_plan->module~dtfft_config module~dtfft_plan->module~dtfft_reshape_plan module~dtfft_plan->module~dtfft_transpose_plan module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_plan->module~dtfft_executor_vkfft_m module~dtfft_plan->module~dtfft_pencil module~dtfft_plan->module~dtfft_abstract_executor module~dtfft_executor_fftw_m dtfft_executor_fftw_m module~dtfft_plan->module~dtfft_executor_fftw_m module~dtfft_executor_mkl_m dtfft_executor_mkl_m module~dtfft_plan->module~dtfft_executor_mkl_m module~dtfft_reshape_handle_datatype->module~dtfft_abstract_reshape_handle module~dtfft_reshape_handle_datatype->module~dtfft_pencil program~test_device_kernels test_device_kernels program~test_device_kernels->module~dtfft_abstract_kernel program~test_device_kernels->module~dtfft_config program~test_device_kernels->module~dtfft_kernel_device program~test_device_kernels->module~dtfft_kernel_host module~dtfft_abstract_executor->module~dtfft_pencil module~dtfft_backend_cufftmp_m->module~dtfft_abstract_backend module~dtfft_backend_cufftmp_m->module~dtfft_pencil module~dtfft_backend_mpi->module~dtfft_abstract_backend module~dtfft_backend_nccl_m->module~dtfft_abstract_backend module~dtfft_executor_fftw_m->module~dtfft_pencil module~dtfft_executor_fftw_m->module~dtfft_abstract_executor program~test_host_kernels test_host_kernels program~test_host_kernels->module~dtfft_kernel_host module~dtfft_executor_mkl_m->module~dtfft_abstract_executor

Variables

Type Visibility Attributes Name Initial
type(dtfft_compression_mode_t), public, parameter :: DTFFT_COMPRESSION_MODE_LOSSLESS = dtfft_compression_mode_t(1)

Lossless compression mode

type(dtfft_compression_mode_t), public, parameter :: DTFFT_COMPRESSION_MODE_FIXED_RATE = dtfft_compression_mode_t(2)

Fixed rate compression mode

type(dtfft_compression_mode_t), public, parameter :: DTFFT_COMPRESSION_MODE_FIXED_PRECISION = dtfft_compression_mode_t(3)

Fixed precision compression mode

type(dtfft_compression_mode_t), public, parameter :: DTFFT_COMPRESSION_MODE_FIXED_ACCURACY = dtfft_compression_mode_t(4)

Fixed accuracy compression mode

type(dtfft_compression_lib_t), public, parameter :: DTFFT_COMPRESSION_LIB_ZFP = dtfft_compression_lib_t(11)

ZFP compression library

type(dtfft_compression_config_t), public, parameter :: DEFAULT_COMPRESSION_CONFIG = dtfft_compression_config_t(DTFFT_COMPRESSION_LIB_ZFP, DTFFT_COMPRESSION_MODE_LOSSLESS, -1.0, -1, -1.0)

Default compression configuration

type(dtfft_compression_mode_t), private, parameter :: VALID_COMPRESSION_MODES(*) = [DTFFT_COMPRESSION_MODE_LOSSLESS, DTFFT_COMPRESSION_MODE_FIXED_RATE, DTFFT_COMPRESSION_MODE_FIXED_PRECISION, DTFFT_COMPRESSION_MODE_FIXED_ACCURACY]
type(dtfft_compression_lib_t), private, parameter :: VALID_COMPRESSION_LIBS(*) = [DTFFT_COMPRESSION_LIB_ZFP]

List of valid compression libraries


Interfaces

public interface dtfft_compression_config_t

Type bound constuctor for dtfft_compression_config_t

  • private pure function create_compression_config_t(lib, mode, rate, precision, tolerance) result(config)

    Creates a compression configuration object

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_compression_lib_t), intent(in) :: lib

    Compression library to use

    type(dtfft_compression_mode_t), intent(in) :: mode

    Compression mode

    real(kind=c_double), intent(in), optional :: rate

    Compression rate (for fixed rate mode)

    integer(kind=c_int32_t), intent(in), optional :: precision

    Precision (for fixed precision mode)

    real(kind=c_double), intent(in), optional :: tolerance

    Tolerance (for fixed accuracy mode)

    Return Value type(dtfft_compression_config_t)

public interface operator(==)

public interface operator(/=)


Abstract Interfaces

abstract interface

  • private function create_private_interface(self, config, platform, base_type)

    Creates the compressor implementation

    Arguments

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

    Compressor instance

    type(dtfft_compression_config_t), intent(in) :: config

    Compression configuration

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

    Target platform

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

    MPI data type

    Return Value integer(kind=int32)

abstract interface

  • private function compress_private_interface(self, dims, in, out, stream)

    Performs compression using the implementation

    Arguments

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

    Compressor instance

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

    Array dimensions

    type(c_ptr), intent(in) :: in

    Pointer to uncompressed data

    type(c_ptr), intent(in) :: out

    Pointer to compressed buffer

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

    Stream handle

    Return Value integer(kind=int64)

abstract interface

  • private subroutine decompress_private_interface(self, dims, in, out, stream)

    Performs decompression using the implementation

    Arguments

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

    Compressor instance

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

    Array dimensions

    type(c_ptr), intent(in) :: in

    Pointer to compressed data

    type(c_ptr), intent(in) :: out

    Pointer to uncompressed buffer

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

    Stream handle

abstract interface

  • private subroutine destroy_interface(self)

    Destroys the compressor implementation

    Arguments

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

    Compressor instance

abstract interface

  • private subroutine sync_interface(self, stream)

    Arguments

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

    Abstract kernel

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

Derived Types

type, public, abstract ::  abstract_compressor

Abstract base class for compression implementations

Components

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

Number of dimensions

integer(kind=int64), public :: storage_size

Size of storage per element

real(kind=real64), public :: compressed_rate

Accumulated compression rate

integer(kind=int64), public :: execution_count

Number of compression executions

integer(kind=int32), public :: dims_permutation

Dimension permutation flag

Type-Bound Procedures

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

Initializes the compressor with given parameters

procedure, public, non_overridable, pass(self) :: compress ../../

Compresses the input data and returns the compressed size

procedure, public, non_overridable, pass(self) :: decompress ../../

Decompresses the input data into the output buffer

procedure, public, non_overridable, pass(self) :: get_average_rate ../../

Returns the average compression rate over all executions

procedure(sync_interface), public, deferred, pass(self) :: pre_sync
procedure(sync_interface), public, deferred, pass(self) :: post_sync
procedure(sync_interface), public, deferred, pass(self) :: sync
procedure(create_private_interface), public, deferred, pass(self) :: create_private ../../

Creates the compressor implementation

procedure(compress_private_interface), public, deferred, pass(self) :: compress_private ../../

Performs compression using the implementation

procedure(decompress_private_interface), public, deferred, pass(self) :: decompress_private ../../

Performs decompression using the implementation

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

Destroys the compressor implementation

type, public, bind(C) ::  dtfft_compression_mode_t

Type that specifies compression mode

Components

Type Visibility Attributes Name Initial
integer(kind=c_int32_t), public :: val

Internal value

type, public, bind(C) ::  dtfft_compression_lib_t

Type that specifies compression library

Components

Type Visibility Attributes Name Initial
integer(kind=c_int32_t), public :: val

Internal value

type, public, bind(C) ::  dtfft_compression_config_t

Components

Type Visibility Attributes Name Initial
type(dtfft_compression_lib_t), public :: compression_lib

Library to use. Currently only support ZFP

type(dtfft_compression_mode_t), public :: compression_mode

Compression mode to use

real(kind=c_double), public :: rate

Rate for DTFFT_COMPRESSION_MODE_FIXED_RATE

integer(kind=c_int32_t), public :: precision

Precision for DTFFT_COMPRESSION_MODE_FIXED_PRECISION

real(kind=c_double), public :: tolerance

Tolerance for DTFFT_COMPRESSION_MODE_FIXED_ACCURACY

Constructor

Type bound constuctor for dtfft_compression_config_t

private pure function create_compression_config_t (lib, mode, rate, precision, tolerance)

Creates a compression configuration object


Functions

public pure function check_compression_config(config) result(error_code)

Checks if the given compression configuration is valid

Arguments

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

Compression configuration to check

Return Value integer(kind=int32)

private pure function create_compression_config_t(lib, mode, rate, precision, tolerance) result(config)

Creates a compression configuration object

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_lib_t), intent(in) :: lib

Compression library to use

type(dtfft_compression_mode_t), intent(in) :: mode

Compression mode

real(kind=c_double), intent(in), optional :: rate

Compression rate (for fixed rate mode)

integer(kind=c_int32_t), intent(in), optional :: precision

Precision (for fixed precision mode)

real(kind=c_double), intent(in), optional :: tolerance

Tolerance (for fixed accuracy mode)

Return Value type(dtfft_compression_config_t)

private function create(self, ndims, config, platform, base_type, storage_size, dims_permutation)

Initializes the compressor with given parameters

Arguments

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

Compressor instance

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

Number of dimensions

type(dtfft_compression_config_t), intent(in) :: config

Compression configuration

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

Target platform

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

MPI data type

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

Storage size per element

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

Dimension permutation flag

Return Value integer(kind=int32)

private function compress(self, dims, displ, in, out, stream)

Compresses the input data and returns the compressed size

Arguments

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

Compressor instance

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

Array dimensions

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

Displacement in arrays

type(c_ptr), intent(in) :: in

Pointer to uncompressed data

type(c_ptr), intent(in) :: out

Pointer to compressed buffer

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

Stream handle

Return Value integer(kind=int64)

private pure function get_average_rate(self)

Returns the average compression rate over all executions

Arguments

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

Compressor instance

Return Value real(kind=real64)

private pure elemental function compression_mode_eq(left, right) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_mode_t), intent(in) :: left
type(dtfft_compression_mode_t), intent(in) :: right

Return Value logical

private pure elemental function compression_mode_ne(left, right) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_mode_t), intent(in) :: left
type(dtfft_compression_mode_t), intent(in) :: right

Return Value logical

private pure elemental function compression_lib_eq(left, right) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_lib_t), intent(in) :: left
type(dtfft_compression_lib_t), intent(in) :: right

Return Value logical

private pure elemental function compression_lib_ne(left, right) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_lib_t), intent(in) :: left
type(dtfft_compression_lib_t), intent(in) :: right

Return Value logical

private pure elemental function is_valid_compression_mode(param) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_mode_t), intent(in) :: param

Return Value logical

private pure elemental function is_valid_compression_lib(param) result(res)

Arguments

Type IntentOptional Attributes Name
type(dtfft_compression_lib_t), intent(in) :: param

Return Value logical


Subroutines

private subroutine decompress(self, dims, displ, in, out, stream)

Decompresses the input data into the output buffer

Arguments

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

Compressor instance

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

Array dimensions

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

Displacement in arrays

type(c_ptr), intent(in) :: in

Pointer to compressed data

type(c_ptr), intent(in) :: out

Pointer to uncompressed buffer

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

Stream handle