Go to the documentation of this file.
56 #define GRVY_MAJOR_VERSION 0
57 #define GRVY_MINOR_VERSION 38
58 #define GRVY_MICRO_VERSION 0
60 #define GRVY_BUILD_USER "runner"
61 #define GRVY_BUILD_ARCH "x86_64-pc-linux-gnu"
62 #define GRVY_BUILD_HOST "fv-az108-71"
63 #define GRVY_BUILD_DATE "2023-07-12 16:53"
64 #define GRVY_BUILD_VERSION "8f03925"
66 #define GRVY_LIB_VERSION "0.38.0"
67 #define GRVY_LIB_RELEASE "Development Build"
69 #define GRVY_CXX "g++"
70 #define GRVY_CXXFLAGS "-g -O2"
72 #define GRVY_FC "gfortran"
73 #define GRVY_FCFLAGS "-g -O2"
74 #define GRVY_MPI_ENABLED 0
75 #define GRVY_OCORE_ENABLED 0
77 #if GRVY_MPI_ENABLED == 1
80 #define MPICH_SKIP_MPICXX
81 #define OMPI_SKIP_MPICXX
646 int num_procs,
const char *filename);
651 int num_procs,
int jobId,
const char *code_revision,
652 double flops,
const char *filename);
659 const char *comment,
int num_procs,
const char *filename);
664 const char *comment,
int num_procs,
int jobId,
665 const char *code_revision,
double flops,
const char *filename);
682 #if GRVY_OCORE_ENABLED == 1
706 extern int grvy_ocore_init (
const char *input_file,
int num_ocore_tasks, MPI_Comm GLOB_COMM);
707 extern int grvy_ocore_init_fortran (
const char *input_file,
int num_ocore_tasks,
int GLOB_COMM_COMM);
708 extern void grvy_ocore_finalize ();
710 extern int grvy_ocore_master ();
711 extern int grvy_ocore_enabled ();
712 extern int grvy_ocore_blocksize ();
713 extern size_t grvy_ocore_num_active ();
729 extern int grvy_ocore_write_double (
size_t record_id,
double *data);
730 extern int grvy_ocore_write_float (
size_t record_id,
float *data);
731 extern int grvy_ocore_write_int (
size_t record_id,
int *data);
732 extern int grvy_ocore_write_int64 (
size_t record_id,
long long int *data);
734 extern int grvy_ocore_read_double (
size_t record_id,
double *data);
735 extern int grvy_ocore_read_float (
size_t record_id,
float *data);
736 extern int grvy_ocore_read_int (
size_t record_id,
int *data);
737 extern int grvy_ocore_read_int64 (
size_t record_id,
long long int *data);
751 extern size_t grvy_ocore_pop_record_float (
float *data);
752 extern size_t grvy_ocore_pop_record_double (
double *data);
753 extern size_t grvy_ocore_pop_record_int (
int *data);
754 extern size_t grvy_ocore_pop_record_int64 (
long long int *data);
829 typedef enum {GRVY_NOLOG = -1,
857 extern int grvy_printf (
int loglevel,
const char *format,...);
924 extern int grvy_copy_dir (
const char *from_dir,
const char *to_dir);
1122 namespace GRVYGetPot
1160 void GRVY_version_stdout();
1161 int GRVY_get_numeric_version();
1172 class GRVY_Input_Class {
1175 GRVY_Input_Class ();
1176 ~GRVY_Input_Class ();
1193 int Open (
const char *filename);
1198 int Load (std::stringstream &buffer);
1228 int Fdump (
const char *prefix);
1231 int Fdump (
const char *prefix,
const char *filename);
1252 template <
typename T>
int Read_Var (std::string keyword, T *value );
1253 template <
typename T>
int Read_Var (std::string keyword, T *value, T vardef);
1255 template <
typename T>
int Read_Var (
const char *keyword, T *value );
1256 template <
typename T>
int Read_Var (
const char *keyword, T *value, T vardef);
1260 int Read_Var (
const char *keyword, std::string *value);
1261 int Read_Var (
const char *keyword,
char **value);
1262 int Read_Var (
const char *keyword, std::string *value, std::string vardef);
1266 int Read_Var (
const char *var,
bool *value,
bool vardef);
1267 int Read_Var (std::string var,
bool *value,
bool vardef);
1284 template <
typename T>
int Read_Var_Vec (std::string keyword, T *values,
int nelems);
1285 template <
typename T>
int Read_Var_Vec (
const char *keyword, T *values,
int nelems);
1286 template <
typename T>
int Read_Var_Vec (std::string keyword, T *values,
int nelems, T vardef);
1287 template <
typename T>
int Read_Var_Vec (
const char *keyword, T *values,
int nelems, T vardef);
1304 template <
typename T>
int Read_Var_iVec (std::string keyword, T *value,
int elem);
1305 template <
typename T>
int Read_Var_iVec (
const char *keyword, T *value,
int elem);
1306 template <
typename T>
int Read_Var_iVec (std::string keyword, T *value,
int elem, T vardef);
1307 template <
typename T>
int Read_Var_iVec (
const char *keyword, T *value,
int elem, T vardef);
1311 int Read_Var_iVec (
const char *keyword,
char **value,
int elem);
1312 int Read_Var_iVec (
const char *keyword, std::string *value,
int elem);
1333 void Register_Var (
const char *keyword,
int var);
1334 void Register_Var (
const char *keyword,
float var);
1335 void Register_Var (
const char *keyword,
double var);
1336 void Register_Var (
const char *keyword,
bool var);
1337 void Register_Var (
const char *keyword,
const char *var);
1338 void Register_Var (
const char *keyword, std::string var);
1355 int Get_Var (
const char *keyword,
int *value);
1356 int Get_Var (
const char *keyword,
float *value);
1357 int Get_Var (
const char *keyword,
double *value);
1358 int Get_Var (
const char *keyword,
char **value);
1359 int Get_Var (
const char *keyword, std::string *value);
1361 void PrintRegVars (
const char *prefix);
1366 class GRVY_Input_ClassImp ;
1367 std::unique_ptr<GRVY_Input_ClassImp> m_pimpl;
1420 class GRVY_Timer_Class {
1423 GRVY_Timer_Class ();
1424 ~GRVY_Timer_Class ();
1442 void Init (std::string name);
1443 void BeginTimer (std::string
id);
1444 void EndTimer (std::string
id);
1461 double ElapsedSeconds (std::string
id);
1462 double ElapsedGlobal ();
1467 int SetSummarizeWidth(
const int width);
1469 size_t StatsCount (std::string
id);
1470 double StatsMean (std::string
id);
1471 double StatsVariance (std::string
id);
1472 double StatsMin (std::string
id);
1473 double StatsMax (std::string
id);
1477 double ElapsedSeconds_inc(std::string
id);
1478 double StatsMean_inc (std::string
id);
1479 double StatsVariance_inc (std::string
id);
1480 double StatsMin_inc (std::string
id);
1481 double StatsMax_inc (std::string
id);
1523 int SaveHistTiming (std::string experiment, std::string comment,
int num_procs,
1524 std::string filename);
1526 int SaveHistTiming (std::string experiment, std::string comment,
int num_procs,
1527 int jobId, std::string code_revision,
double flops, std::string filename);
1531 int SaveHistTiming (
double timing, std::string machinename, std::string experiment,
1532 std::string comment,
int num_procs, std::string filename);
1534 int SaveHistTiming (
double timing, std::string machinename, std::string experiment,
1535 std::string comment,
int num_procs,
int jobId, std::string code_revision,
1536 double flops, std::string filename);
1542 void SummarizeHistTiming (std::string filename, std::string delimiter, std::string outdir);
1549 int SetOption (std::string option,
bool flag);
1552 class GRVY_Timer_ClassImp;
1553 std::unique_ptr<GRVY_Timer_ClassImp> m_pimpl;
1578 class GRVY_MPI_Ocore_Class {
1581 GRVY_MPI_Ocore_Class();
1582 ~GRVY_MPI_Ocore_Class();
1584 #if GRVY_OCORE_ENABLED == 1
1597 int Initialize (std::string inputfile,
int num_ocore_tasks, MPI_Comm GLOB_COMM);
1599 size_t NumActive ();
1602 bool isOcoreTask ();
1625 template <
typename T>
int Write (
size_t offset,T *data );
1626 template <
typename T>
int Read (
size_t offset,T *data );
1645 template <
typename T>
size_t PopRecord (T *data );
1652 class GRVY_MPI_Ocore_ClassImp;
1653 std::unique_ptr<GRVY_MPI_Ocore_ClassImp> m_pimpl;
1662 class GRVY_HDF5_Class
1664 friend class GRVY_Timer_Class;
1668 ~GRVY_HDF5_Class ();
1670 GRVY_HDF5_Class (
const GRVY_HDF5_Class &rhs);
1671 GRVY_HDF5_Class &operator= (GRVY_HDF5_Class );
1675 int Create (std::string filename,
bool overwrite_existing);
1676 int Open (std::string filename,
bool read_only );
1677 bool Exists (std::string filename);
1682 int GroupCreate (std::string groupname);
1683 int GroupOpen (std::string groupname);
1684 bool GroupExists (std::string groupname);
1686 std::vector<std::string> ListSubGroups(std::string groupname);
1690 int DatasetOpen (std::string groupname, std::string datasetname);
1691 bool DatasetExists(std::string groupname, std::string datasetname);
1695 int AttributeOpen (std::string groupname, std::string attribute);
1696 bool AttributeExists(std::string groupname, std::string attribute);
1698 int AttributeWrite(std::string groupname, std::string attribute,
short int value);
1699 int AttributeWrite(std::string groupname, std::string attribute,
int value);
1700 int AttributeWrite(std::string groupname, std::string attribute,
long value);
1701 int AttributeWrite(std::string groupname, std::string attribute,
unsigned short int value);
1702 int AttributeWrite(std::string groupname, std::string attribute,
unsigned int value);
1703 int AttributeWrite(std::string groupname, std::string attribute,
unsigned long value);
1704 int AttributeWrite(std::string groupname, std::string attribute,
float value);
1705 int AttributeWrite(std::string groupname, std::string attribute,
double value);
1706 int AttributeWrite(std::string groupname, std::string attribute, std::string value);
1708 int AttributeRead (std::string groupname, std::string attribute,
short int &value);
1709 int AttributeRead (std::string groupname, std::string attribute,
int &value);
1710 int AttributeRead (std::string groupname, std::string attribute,
long &value);
1711 int AttributeRead (std::string groupname, std::string attribute,
unsigned short int &value);
1712 int AttributeRead (std::string groupname, std::string attribute,
unsigned int &value);
1713 int AttributeRead (std::string groupname, std::string attribute,
unsigned long &value);
1714 int AttributeRead (std::string groupname, std::string attribute,
float &value);
1715 int AttributeRead (std::string groupname, std::string attribute,
double &value);
1716 int AttributeRead (std::string groupname, std::string attribute, std::string &value);
1723 class GRVY_HDF5_ClassImp;
1724 std::unique_ptr<GRVY_HDF5_ClassImp> m_pimpl;
int grvy_printf(int loglevel, const char *format,...)
Post log message at loglevel priority using printf() style formatting.
int grvy_timer_save_hist(const char *experiment_name, const char *comment, int num_procs, const char *filename)
Save current libGRVY timing results to HDF file for logging.
double grvy_timer_stats_min(const char *id)
Returns the minimum (exclusive) measured timing (in seconds) for defined timer id.
double grvy_timer()
Basic wallclock timer which provides the time since epoch in seconds.
void grvy_timer_finalize()
Finalize global timing process - stops the active global timer.
double grvy_timer_elapsedseconds_inc(const char *id)
Returns total (inclusive) elapsed time (in seconds) for defined timer id.
void grvy_timer_begin(const char *id)
Identify beginning of code section to time with unique id string.
int grvy_timer_stats_count(const char *id)
Returns the total number of timer calls for defined timer id.
void grvy_timer_init(const char *description)
Initialize timer library with a description string which initiates the global timing process (the des...
void grvy_timer_summarize()
Print a concise summary of all defined timers to stdout. This routine shows the relative runtime perc...
double grvy_timer_elapsedseconds(const char *id)
Returns total (exclusive) elapsed time (in seconds) for defined timer id.
int grvy_create_scratch_dir(char *name_template)
Identical to grvy_create_unique_dir(), except that the new directory and all of its contents are dele...
int grvy_timer_set_summarize_width(const int maxwidth)
Set max allowed width of grvy_timer_summarize() output. The normal default is to limit output width t...
double grvy_timer_stats_min_inc(const char *id)
Returns the minimum (inclusive) measured timing (in seconds) for defined timer id.
double grvy_timer_stats_max_inc(const char *id)
Returns the largest (inclusive) measured timing (in seconds) for defined timer id.
int grvy_timer_save_hist_ext_exp(double timing, const char *machinename, const char *experiment, const char *comment, int num_procs, int jobId, const char *code_revision, double flops, const char *filename)
Save a single timing result to HDF file for logging (expanded version)..
int grvy_check_file_path(const char *name_template)
Checks a desired output pathname and creates any non-existing parent directories. The Unix pathname t...
double grvy_timer_stats_mean_inc(const char *id)
Returns the mean (inclusive) value (in seconds) for defined timer id.
int grvy_double_isnan(double *value)
Check if input double value is not a number (NaN)
int grvy_log_getlevel()
Get current logging priority level.
void grvy_timer_reset()
Resets all actively defined timers (accumulated time and calling statistics are reinitialized).
void grvy_timer_end(const char *id)
Identify end of code section to time with a matching id string.
int grvy_create_unique_dir(char *name_template)
Creates a new, unique directory with 0700 permissions using the provided name_template....
int grvy_float_isnan(float *value)
Check if input float value is not a number (NaN)
int grvy_float_isinf(float *value)
Check if input float value is infinite (Inf)
double grvy_timer_stats_variance_inc(const char *id)
Returns the variance (inclusive) for defined timer id.
void grvy_log_setlevel(int priority)
Set current logging priority level.
int grvy_timer_save_hist_exp(const char *experiment_name, const char *comment, int num_procs, int jobId, const char *code_revision, double flops, const char *filename)
Save current libGRVY timing results to HDF file for logging (expanded version).
int grvy_get_numeric_version()
Obtain numeric library version.
double grvy_timer_elapsed_global()
Returns total elapsed time (in seconds) for the global timer.
double grvy_timer_stats_mean(const char *id)
Returns the mean (exclusive) value (in seconds) for defined timer id.
int grvy_timer_save_hist_ext(double timing, const char *machinename, const char *experiment, const char *comment, int num_procs, const char *filename)
Save a single timing result to HDF file for logging.
void grvy_log_setmask(int loglevel, const char *delimiter)
Set logging mask delimiter which prepends messages of loglevel priority.
void grvy_summarize_hist_timing(const char *filename, const char *delimiter, const char *outdir)
Summarize and dump historical timing information to ascii files from logged results stored previously...
void grvy_version_stdout()
Echo library versioning and configuration information to stdout.
double grvy_timer_stats_variance(const char *id)
Returns the variance (exclusive) for defined timer id.
int grvy_double_isinf(double *vauel)
Check if input double value is infinite (Inf)
int grvy_copy_dir(const char *from_dir, const char *to_dir)
Recursively copies contents of existing directory (from_dir) to a new directory (to_dir)....
double grvy_timer_stats_max(const char *id)
Returns the largest (exclusive) measured timing (in seconds) for defined timer id.
Generated on Wed Jul 12 2023 16:53:23 for GRVY-0.38.0
by
doxygen
1.8.17