m_memcheck_estimate Module

The per-GPU memory estimate of x3d2-memcheck.


Uses

  • module~~m_memcheck_estimate~~UsesGraph module~m_memcheck_estimate m_memcheck_estimate module~m_common m_common module~m_memcheck_estimate->module~m_common module~m_cuda_poisson_fft m_cuda_poisson_fft module~m_memcheck_estimate->module~m_cuda_poisson_fft module~m_logger m_logger module~m_memcheck_estimate->module~m_logger module~m_memcheck_context m_memcheck_context module~m_memcheck_estimate->module~m_memcheck_context module~m_memory_estimate m_memory_estimate module~m_memcheck_estimate->module~m_memory_estimate module~m_common->module~m_logger m_mpi m_mpi module~m_common->m_mpi module~m_cuda_poisson_fft->module~m_common module~m_cuda_poisson_fft->module~m_logger cudafor cudafor module~m_cuda_poisson_fft->cudafor cufft cufft module~m_cuda_poisson_fft->cufft cufftXt cufftXt module~m_cuda_poisson_fft->cufftXt iso_c_binding iso_c_binding module~m_cuda_poisson_fft->iso_c_binding 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_field m_field module~m_cuda_poisson_fft->module~m_field module~m_mesh m_mesh module~m_cuda_poisson_fft->module~m_mesh 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_memcheck_context->module~m_common module~m_memcheck_context->module~m_logger module~m_config m_config module~m_memcheck_context->module~m_config module~m_cuda_memcheck_device m_cuda_memcheck_device module~m_memcheck_context->module~m_cuda_memcheck_device module~m_memcheck_context->module~m_mesh module~m_memory_estimate->module~m_common module~m_allocator m_allocator 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_allocator->module~m_common module~m_allocator->module~m_field 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_allocator module~m_cuda_allocator->module~m_field module~m_cuda_allocator->module~m_mesh module~m_cuda_errors->module~m_logger module~m_cuda_errors->cudafor module~m_cuda_memcheck_device->module~m_common module~m_cuda_memcheck_device->module~m_cuda_poisson_fft module~m_cuda_memcheck_device->module~m_logger module~m_cuda_memcheck_device->module~m_memory_estimate module~m_cuda_memcheck_device->cudafor module~m_cuda_memcheck_device->cufft module~m_cuda_memcheck_device->cufftXt module~m_cuda_memcheck_device->iso_c_binding module~m_cuda_memcheck_device->module~m_mesh module~m_base_case m_base_case module~m_cuda_memcheck_device->module~m_base_case module~m_cuda_common m_cuda_common module~m_cuda_memcheck_device->module~m_cuda_common module~m_cuda_sendrecv->module~m_common module~m_cuda_sendrecv->module~m_logger module~m_cuda_sendrecv->cudafor module~m_cuda_sendrecv->m_mpi module~m_cuda_sendrecv->module~m_cuda_errors module~m_cuda_spectral->module~m_common module~m_cuda_spectral->cudafor module~m_field->module~m_common module~m_field->iso_c_binding 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_poisson_fft->module~m_common module~m_poisson_fft->module~m_logger module~m_poisson_fft->module~m_field module~m_poisson_fft->module~m_mesh module~m_poisson_fft->module~m_tdsops 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_field module~m_base_backend m_base_backend module~m_time_integrator->module~m_base_backend module~m_base_backend->module~m_common module~m_base_backend->module~m_logger module~m_base_backend->iso_c_binding 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_mesh module~m_base_backend->module~m_poisson_fft module~m_base_backend->module~m_tdsops module~m_base_case->module~m_common module~m_base_case->module~m_logger module~m_base_case->m_mpi module~m_base_case->module~m_allocator module~m_base_case->module~m_config module~m_base_case->module~m_field module~m_base_case->module~m_mesh module~m_base_case->module~m_base_backend 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_mesh_content->module~m_common module~m_mesh_content->module~m_logger 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_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_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_allocator module~m_solver->module~m_config module~m_solver->module~m_field module~m_solver->module~m_mesh module~m_solver->module~m_tdsops module~m_solver->module~m_time_integrator module~m_solver->module~m_base_backend 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_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->m_mpi module~m_ibm->module~m_allocator module~m_ibm->module~m_field module~m_ibm->module~m_mesh module~m_ibm->module~m_base_backend module~m_ibm->module~m_io_session module~m_les->module~m_common module~m_les->module~m_logger module~m_les->module~m_config module~m_les->module~m_field module~m_les->module~m_mesh module~m_les->module~m_tdsops module~m_les->module~m_base_backend 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_tdsops module~m_tdsops_setup->module~m_base_backend 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_field module~m_vector_calculus->module~m_tdsops module~m_vector_calculus->module~m_base_backend 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_field module~m_io_session->module~m_base_backend 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_field module~m_io_backend->module~m_base_backend module~m_io_backend->module~m_io_base module~m_io_base->module~m_common module~m_io_base->module~m_field module~m_io_base->module~m_base_backend module~m_nvtx->iso_c_binding

Used by

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

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: n_halo = 4
integer, public, parameter :: basis_measured = 1

How the overhead of an estimate was obtained: from the num_gpus=1 probe or measurement, that scaled to num_gpus>1, from the formula alone, or from the formula with the heap predicted by the plan query (the full-grid probe did not fit).

integer, public, parameter :: basis_extrapolated = 2

How the overhead of an estimate was obtained: from the num_gpus=1 probe or measurement, that scaled to num_gpus>1, from the formula alone, or from the formula with the heap predicted by the plan query (the full-grid probe did not fit).

integer, public, parameter :: basis_formula = 3

How the overhead of an estimate was obtained: from the num_gpus=1 probe or measurement, that scaled to num_gpus>1, from the formula alone, or from the formula with the heap predicted by the plan query (the full-grid probe did not fit).

integer, public, parameter :: basis_predicted = 4

How the overhead of an estimate was obtained: from the num_gpus=1 probe or measurement, that scaled to num_gpus>1, from the formula alone, or from the formula with the heap predicted by the plan query (the full-grid probe did not fit).

character(len=12), public, parameter :: basis_name(4) = [character(len=12)::'measured', 'extrapolated', 'formula-only', 'predicted']

Functions

public pure function to_gib(n_bytes) result(gib)

Bytes to GiB, the one conversion every printed figure goes through.

Arguments

Type IntentOptional Attributes Name
integer(kind=i8), intent(in) :: n_bytes

Return Value real(kind=dp)

public pure function classify(per_gpu_gib, total_gib) result(verdict)

The FITS, BORDERLINE or DOES_NOT_FIT verdict of every estimate.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: per_gpu_gib
real(kind=dp), intent(in) :: total_gib

Return Value character(len=12)

public function num_gpus_unsupported_reason(ctx, num_gpus) result(reason)

The reason GPU count num_gpus is not a supported decomposition, blank when it is.

Arguments

Type IntentOptional Attributes Name
type(memcheck_ctx_t), intent(in) :: ctx
integer, intent(in) :: num_gpus

Return Value character(len=96)

public function requested_unsupported_reason(ctx) result(reason)

The reason the nproc_dir of the input file is not supported, blank when it is. The CUDA backend only supports nproc_dir = [1,1,num_gpus].

Arguments

Type IntentOptional Attributes Name
type(memcheck_ctx_t), intent(in) :: ctx

Return Value character(len=96)

public function fields_plus_halo_bytes_n(ctx, num_gpus, npeak) result(nbytes8)

The fields and halo term at num_gpus GPUs for npeak fields.

Arguments

Type IntentOptional Attributes Name
type(memcheck_ctx_t), intent(in) :: ctx
integer, intent(in) :: num_gpus
integer, intent(in) :: npeak

Return Value integer(kind=i8)


Subroutines

public subroutine prepare_probe(ctx)

Decides the FFT probe once per run and runs it. The small-grid probe gives the context and the heap. The full-grid probe follows when the mode allows and the card has room for the memory the plans need. The decision is in ctx%probe_plan and ctx%probe_reason (see ensure_probe in the device).

Arguments

Type IntentOptional Attributes Name
type(memcheck_ctx_t), intent(inout) :: ctx

public subroutine estimate_for_num_gpus(ctx, num_gpus, per_gpu_gib, basis, verdict, workspace_gib, overhead_gib, io_gib, used_gib, npeak)

The per-GPU estimate at num_gpus GPUs. The formula floor stands unless the full-grid probe gave a result and the floor is not over the limit. workspace_gib, overhead_gib and io_gib (optional) split the result. used_gib and npeak (optional) are the num_gpus=1 measurement of the real build and its peak_fields: the estimate is then that measurement scaled to num_gpus, and workspace_gib holds the fields and halo alone.

Arguments

Type IntentOptional Attributes Name
type(memcheck_ctx_t), intent(inout) :: ctx
integer, intent(in) :: num_gpus
real(kind=dp), intent(out) :: per_gpu_gib
integer, intent(out) :: basis
character(len=12), intent(out) :: verdict
real(kind=dp), intent(out), optional :: workspace_gib
real(kind=dp), intent(out), optional :: overhead_gib
real(kind=dp), intent(out), optional :: io_gib
real(kind=dp), intent(in), optional :: used_gib
integer, intent(in), optional :: npeak