m_cuda_memcheck_device Module

The CUDA device of x3d2-memcheck: the FFT plan probe and the memory readings.


Uses

  • module~~m_cuda_memcheck_device~~UsesGraph module~m_cuda_memcheck_device m_cuda_memcheck_device cudafor cudafor module~m_cuda_memcheck_device->cudafor cufft cufft module~m_cuda_memcheck_device->cufft cufftXt cufftXt module~m_cuda_memcheck_device->cufftXt iso_c_binding iso_c_binding module~m_cuda_memcheck_device->iso_c_binding module~m_base_case m_base_case module~m_cuda_memcheck_device->module~m_base_case module~m_common m_common module~m_cuda_memcheck_device->module~m_common module~m_cuda_common m_cuda_common module~m_cuda_memcheck_device->module~m_cuda_common module~m_cuda_poisson_fft m_cuda_poisson_fft module~m_cuda_memcheck_device->module~m_cuda_poisson_fft module~m_logger m_logger module~m_cuda_memcheck_device->module~m_logger module~m_memory_estimate m_memory_estimate module~m_cuda_memcheck_device->module~m_memory_estimate module~m_mesh m_mesh module~m_cuda_memcheck_device->module~m_mesh module~m_base_case->module~m_common module~m_base_case->module~m_logger module~m_base_case->module~m_mesh m_mpi m_mpi module~m_base_case->m_mpi module~m_allocator m_allocator module~m_base_case->module~m_allocator module~m_base_backend m_base_backend module~m_base_case->module~m_base_backend module~m_config m_config module~m_base_case->module~m_config module~m_field m_field module~m_base_case->module~m_field module~m_io_manager m_io_manager module~m_base_case->module~m_io_manager module~m_monitoring m_monitoring module~m_base_case->module~m_monitoring module~m_postprocess m_postprocess module~m_base_case->module~m_postprocess module~m_solver m_solver module~m_base_case->module~m_solver module~m_common->module~m_logger module~m_common->m_mpi module~m_cuda_poisson_fft->cudafor module~m_cuda_poisson_fft->cufft module~m_cuda_poisson_fft->cufftXt module~m_cuda_poisson_fft->iso_c_binding module~m_cuda_poisson_fft->module~m_common module~m_cuda_poisson_fft->module~m_logger module~m_cuda_poisson_fft->module~m_mesh module~m_cuda_poisson_fft->m_mpi module~m_cuda_allocator m_cuda_allocator module~m_cuda_poisson_fft->module~m_cuda_allocator module~m_cuda_errors m_cuda_errors module~m_cuda_poisson_fft->module~m_cuda_errors module~m_cuda_sendrecv m_cuda_sendrecv module~m_cuda_poisson_fft->module~m_cuda_sendrecv module~m_cuda_spectral m_cuda_spectral module~m_cuda_poisson_fft->module~m_cuda_spectral module~m_cuda_poisson_fft->module~m_field module~m_poisson_fft m_poisson_fft module~m_cuda_poisson_fft->module~m_poisson_fft module~m_tdsops m_tdsops module~m_cuda_poisson_fft->module~m_tdsops iso_fortran_env iso_fortran_env module~m_logger->iso_fortran_env module~m_logger->m_mpi module~m_memory_estimate->module~m_common module~m_memory_estimate->module~m_allocator module~m_memory_estimate->module~m_config module~m_time_integrator m_time_integrator module~m_memory_estimate->module~m_time_integrator module~m_mesh->module~m_common module~m_mesh->module~m_logger module~m_mesh->m_mpi module~m_mesh->module~m_field module~m_mesh_content m_mesh_content module~m_mesh->module~m_mesh_content module~m_allocator->module~m_common module~m_allocator->module~m_field module~m_base_backend->iso_c_binding module~m_base_backend->module~m_common module~m_base_backend->module~m_logger module~m_base_backend->module~m_mesh module~m_base_backend->m_mpi module~m_base_backend->module~m_allocator module~m_base_backend->module~m_field module~m_base_backend->module~m_poisson_fft module~m_base_backend->module~m_tdsops module~m_config->module~m_common module~m_config->module~m_logger module~m_config->iso_fortran_env module~m_cuda_allocator->module~m_common module~m_cuda_allocator->module~m_mesh module~m_cuda_allocator->module~m_allocator module~m_cuda_allocator->module~m_field module~m_cuda_errors->cudafor module~m_cuda_errors->module~m_logger module~m_cuda_sendrecv->cudafor module~m_cuda_sendrecv->module~m_common module~m_cuda_sendrecv->module~m_logger module~m_cuda_sendrecv->m_mpi module~m_cuda_sendrecv->module~m_cuda_errors module~m_cuda_spectral->cudafor module~m_cuda_spectral->module~m_common module~m_field->iso_c_binding module~m_field->module~m_common module~m_io_manager->m_mpi module~m_io_manager->module~m_solver module~m_checkpoint_manager m_checkpoint_manager module~m_io_manager->module~m_checkpoint_manager module~m_checkpoint_state m_checkpoint_state module~m_io_manager->module~m_checkpoint_state module~m_snapshot_manager m_snapshot_manager module~m_io_manager->module~m_snapshot_manager module~m_stats m_stats module~m_io_manager->module~m_stats module~m_mesh_content->module~m_common module~m_mesh_content->module~m_logger module~m_monitoring->module~m_common module~m_monitoring->module~m_logger module~m_monitoring->module~m_field module~m_monitoring->module~m_solver module~m_scalar_series m_scalar_series module~m_monitoring->module~m_scalar_series module~m_poisson_fft->module~m_common module~m_poisson_fft->module~m_logger module~m_poisson_fft->module~m_mesh module~m_poisson_fft->module~m_field module~m_poisson_fft->module~m_tdsops module~m_postprocess->module~m_common module~m_postprocess->module~m_logger module~m_postprocess->module~m_field module~m_postprocess->module~m_solver module~m_solver->module~m_common module~m_solver->module~m_logger module~m_solver->module~m_mesh module~m_solver->module~m_allocator module~m_solver->module~m_base_backend module~m_solver->module~m_config module~m_solver->module~m_field module~m_solver->module~m_tdsops module~m_solver->module~m_time_integrator module~m_ibm m_ibm module~m_solver->module~m_ibm module~m_les m_les module~m_solver->module~m_les module~m_tdsops_setup m_tdsops_setup module~m_solver->module~m_tdsops_setup module~m_vector_calculus m_vector_calculus module~m_solver->module~m_vector_calculus module~m_tdsops->module~m_common module~m_tdsops->module~m_logger module~m_time_integrator->module~m_common module~m_time_integrator->module~m_logger module~m_time_integrator->module~m_allocator module~m_time_integrator->module~m_base_backend module~m_time_integrator->module~m_field module~m_checkpoint_manager->module~m_common module~m_checkpoint_manager->module~m_logger module~m_checkpoint_manager->m_mpi module~m_checkpoint_manager->module~m_config module~m_checkpoint_manager->module~m_field module~m_checkpoint_manager->module~m_solver module~m_checkpoint_manager->module~m_checkpoint_state module~m_checkpoint_manager->module~m_stats module~m_io_field_utils m_io_field_utils module~m_checkpoint_manager->module~m_io_field_utils module~m_io_session m_io_session module~m_checkpoint_manager->module~m_io_session module~m_checkpoint_state->module~m_io_session module~m_ibm->module~m_common module~m_ibm->module~m_logger module~m_ibm->module~m_mesh module~m_ibm->m_mpi module~m_ibm->module~m_allocator module~m_ibm->module~m_base_backend module~m_ibm->module~m_field module~m_ibm->module~m_io_session module~m_les->module~m_common module~m_les->module~m_logger module~m_les->module~m_mesh module~m_les->module~m_base_backend module~m_les->module~m_config module~m_les->module~m_field module~m_les->module~m_tdsops module~m_scalar_series->module~m_common module~m_scalar_series->module~m_logger module~m_snapshot_manager->module~m_common module~m_snapshot_manager->module~m_logger module~m_snapshot_manager->m_mpi module~m_snapshot_manager->module~m_config module~m_snapshot_manager->module~m_field module~m_snapshot_manager->module~m_solver module~m_snapshot_manager->module~m_io_field_utils module~m_snapshot_manager->module~m_io_session module~m_stats->module~m_common module~m_stats->module~m_logger module~m_stats->module~m_config module~m_stats->module~m_field module~m_stats->module~m_solver module~m_stats->module~m_io_session module~m_tdsops_setup->module~m_common module~m_tdsops_setup->module~m_logger module~m_tdsops_setup->module~m_mesh module~m_tdsops_setup->module~m_base_backend module~m_tdsops_setup->module~m_tdsops module~m_vector_calculus->module~m_common module~m_vector_calculus->module~m_logger module~m_vector_calculus->module~m_allocator module~m_vector_calculus->module~m_base_backend module~m_vector_calculus->module~m_field module~m_vector_calculus->module~m_tdsops module~m_io_field_utils->module~m_common module~m_io_field_utils->module~m_logger module~m_io_field_utils->module~m_field module~m_io_field_utils->module~m_solver module~m_io_base m_io_base module~m_io_field_utils->module~m_io_base module~m_nvtx m_nvtx module~m_io_field_utils->module~m_nvtx module~m_io_session->module~m_common module~m_io_session->module~m_logger module~m_io_session->module~m_base_backend module~m_io_session->module~m_field module~m_io_backend m_io_backend module~m_io_session->module~m_io_backend module~m_io_session->module~m_io_base module~m_io_backend->module~m_common module~m_io_backend->module~m_logger module~m_io_backend->module~m_base_backend module~m_io_backend->module~m_field module~m_io_backend->module~m_io_base module~m_io_base->module~m_common module~m_io_base->module~m_base_backend module~m_io_base->module~m_field module~m_nvtx->iso_c_binding

Used by

  • module~~m_cuda_memcheck_device~~UsedByGraph module~m_cuda_memcheck_device m_cuda_memcheck_device module~m_memcheck_context m_memcheck_context module~m_memcheck_context->module~m_cuda_memcheck_device module~m_memcheck_report m_memcheck_report module~m_memcheck_report->module~m_cuda_memcheck_device module~m_memcheck_report->module~m_memcheck_context module~m_memcheck_estimate m_memcheck_estimate module~m_memcheck_report->module~m_memcheck_estimate module~m_memcheck_build m_memcheck_build module~m_memcheck_build->module~m_memcheck_context module~m_memcheck_build->module~m_memcheck_report module~m_memcheck_build->module~m_memcheck_estimate module~m_memcheck_estimate->module~m_memcheck_context program~x3d2_memcheck x3d2_memcheck program~x3d2_memcheck->module~m_memcheck_context program~x3d2_memcheck->module~m_memcheck_report program~x3d2_memcheck->module~m_memcheck_build program~x3d2_memcheck->module~m_memcheck_estimate

Variables

Type Visibility Attributes Name Initial
logical, public, save :: foreign_start_ok = .false.

The other processes on the card at the start (false: NVML gave no usable list), the largest change from the start over all samples so far, and the process count of the last sample.

integer, public, save :: foreign_start_nproc = 0
integer, public, save :: foreign_nproc_last = 0
integer(kind=i8), public, save :: foreign_start_bytes = 0_i8
integer(kind=i8), public, save :: foreign_worst = 0_i8
logical, public, save :: foreign_valid = .false.

False after a failed sample, which stops the sampling.


Derived Types

type, public ::  cuda_memcheck_device_t

Components

Type Visibility Attributes Name Initial
type(probe_result_t), public :: probe

The probe whose context and heap the estimate uses.

logical, public :: full_failed = .false.

The full-grid probe returned a failure status, and that status. The small-grid result then stays in place.

integer, public :: full_failed_stat = 0
integer(kind=i8), public :: plan_need_bytes = 0_i8

The memory the FFT plans of the full grid need, from the query-only mode (see query_plan_need). For cuFFTMp it is the predicted heap plus the xtdesc buffer rounded up to 0.5 GiB.

logical, public :: heap_predicted = .false.

The estimate takes the heap and the xtdesc buffer from the two sizes above instead of the probe that ran (see use_predicted_heap).

Type-Bound Procedures

procedure, public :: init
procedure, public :: mem_info
procedure, public :: context_bytes
procedure, public :: sz => pencil_size
procedure, public :: overhead_floor_bytes
procedure, public :: overhead_query_bytes
procedure, public :: probe_ran
procedure, public :: ensure_probe
procedure, public :: query_plan_need
procedure, public :: use_predicted_heap
procedure, public :: heap_bytes
procedure, public :: capture_solver_info
procedure, public :: footprint_bytes
procedure, public :: fft_path_known
procedure, public :: uses_distributed_fft

Subroutines

public subroutine fft_workspace_bytes_query(bc_is_100, bc_is_110, cdims, try_cufftmp, is_root, worksize_bytes, heap_bytes, xtdesc_bytes, used_cufftmp, stat, query_only)

Creates and destroys the forward and backward FFT plans the way the solver does, for the cell dimensions cdims, and for cuFFTMp also the xtdesc buffer, each bracketed with cudaMemGetInfo. worksize_bytes is the plan workspace (used only on the plain cuFFT path, in cuFFTMp it is part of the heap), heap_bytes the memory the plans took, xtdesc_bytes the xtdesc buffer. The 110 BC never uses cuFFTMp. stat is the first non-zero cuFFT/CUDA code, or 0, and the other outputs are then not valid. A plan that aborts inside the library never returns. With query_only set, a cuFFTMp plan is made with auto-allocation off. heap_bytes is then the plan memory without the workspace, worksize_bytes the workspace of both plans (not allocated), xtdesc_bytes is zero and no xtdesc buffer is allocated. A plain cuFFT plan is not changed by it.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: bc_is_100
logical, intent(in) :: bc_is_110
integer, intent(in) :: cdims(3)
logical, intent(in) :: try_cufftmp
logical, intent(in) :: is_root
integer(kind=i8), intent(out) :: worksize_bytes
integer(kind=i8), intent(out) :: heap_bytes
integer(kind=i8), intent(out) :: xtdesc_bytes
logical, intent(out) :: used_cufftmp
integer, intent(out) :: stat
logical, intent(in), optional :: query_only