ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
Loading...
Searching...
No Matches
orb5x::profiler Namespace Reference

Simple interface to Score-P for profiling ORB5. More...

Functions

void profiler_add_region_time (const std::string &region_name, double seconds, long long calls=1)
void profiler_begin_region_impl (const char *region_name, const char *file, int line)
 Begin profiling for a specific region.
void profiler_begin_region_species_impl (int isp, const char *file, int line)
 Open a subregion for a specific species.
void profiler_end_region (const char *region_name)
 End profiling for a specific region.
void profiler_end_region_species (int isp)
 Close a subregion for a specific species.
void profiler_off ()
 Deactivate the profiling.
void profiler_on ()
 Activate the profiling (ON by default).
void profiler_print_summary (const std::string &label)
void profiler_reset_summary ()
void profiler_write_summary_file (const std::string &label)

Detailed Description

Simple interface to Score-P for profiling ORB5.

Author
Emmanuel Lanti (original Fortran), C++ conversion
Date
04/2017 (original), 2024 (C++ conversion)

This module provides a simple interface to Score-P for profiling ORB5. If profiling is not activated at compile time (SCOREP_USER_ENABLE not defined), this module will essentially not do anything to avoid perturbing the simulation with unnecessary directives. Note that when profiling the code, some slow-downs due to Score-P overhead may be observed.

This C++ implementation matches the Fortran profiler.F90 module exactly:

  • When SCOREP_USER_ENABLE is defined: Uses Score-P API
  • When SCOREP_USER_ENABLE is not defined: Does nothing (no overhead)

Function Documentation

◆ profiler_add_region_time()

void orb5x::profiler::profiler_add_region_time ( const std::string & region_name,
double seconds,
long long calls = 1 )

◆ profiler_begin_region_impl()

void orb5x::profiler::profiler_begin_region_impl ( const char * region_name,
const char * file,
int line )

Begin profiling for a specific region.

Parameters
region_nameName of the specific region to profile
fileSource-file name supplied by the profiling macro
lineSource line supplied by the profiling macro

Opens a new region of code to profile. If this routine is called several times with the same region_name, the timings will be combined. When Score-P is not available, this function does nothing.

◆ profiler_begin_region_species_impl()

void orb5x::profiler::profiler_begin_region_species_impl ( int isp,
const char * file,
int line )

Open a subregion for a specific species.

Parameters
ispSpecies number
fileSource-file name supplied by the profiling macro
lineSource line supplied by the profiling macro

Creates a region name "Species N" and begins profiling for it. When Score-P is not available, this function does nothing.

◆ profiler_end_region()

void orb5x::profiler::profiler_end_region ( const char * region_name)

End profiling for a specific region.

Parameters
region_nameName of the specific region to profile

Closes a profiling region. When Score-P is not available, this function does nothing.

◆ profiler_end_region_species()

void orb5x::profiler::profiler_end_region_species ( int isp)

Close a subregion for a specific species.

Parameters
ispSpecies number

Ends profiling for the region "Species N". When Score-P is not available, this function does nothing.

◆ profiler_off()

void orb5x::profiler::profiler_off ( )

Deactivate the profiling.

Disables Score-P recording if Score-P is available

◆ profiler_on()

void orb5x::profiler::profiler_on ( )

Activate the profiling (ON by default).

Enables Score-P recording if Score-P is available

◆ profiler_print_summary()

void orb5x::profiler::profiler_print_summary ( const std::string & label)

◆ profiler_reset_summary()

void orb5x::profiler::profiler_reset_summary ( )

◆ profiler_write_summary_file()

void orb5x::profiler::profiler_write_summary_file ( const std::string & label)