GitLab maintenance scheduled for Today, 2019-12-05, from 17:00 to 18:00 CT - Services will be unavailable during this time.

Commit 48352d36 authored by Shane Snyder's avatar Shane Snyder

make maximum runtime records configurable

use --with-max-records at configure time to change from default
of 2048 records
parent 32096856
......@@ -693,6 +693,7 @@ with_log_hints
with_log_path
with_jobid_env
enable_bgq_mod
with_max_records
'
ac_precious_vars='build_alias
host_alias
......@@ -1330,6 +1331,7 @@ Optional Packages:
--with-jobid-env=<name> Name of environment variable that stores the jobid
(specify "NONE" if no appropriate environment variable is available:
Darshan will use rank 0's pid instead)
--with-max-records=<num> Maximum records for Darshan to track at runtime
Some influential environment variables:
CC C compiler command
......@@ -4278,6 +4280,22 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
# Check whether --with-max-records was given.
if test "${with_max_records+set}" = set; then :
withval=$with_max_records; if test x$withval = xyes; then
as_fn_error $? "--with-max-records must be given a number" "$LINENO" 5
else
cat >>confdefs.h <<_ACEOF
#define __DARSHAN_MAX_RECORDS ${withval}
_ACEOF
fi
fi
DARSHAN_VERSION="3.0.0-pre1"
......
......@@ -300,6 +300,15 @@ if test x$enable_bgq_mod != xno; then
[]))
fi
AC_ARG_WITH(max-records,
[ --with-max-records=<num> Maximum records for Darshan to track at runtime],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-max-records must be given a number)
else
AC_DEFINE_UNQUOTED(__DARSHAN_MAX_RECORDS, ${withval}, Maximum Darshan records to track at runtime)
fi
)
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
......
......@@ -26,7 +26,11 @@
/* Environment variable to override __DARSHAN_MEM_ALIGNMENT */
#define DARSHAN_MEM_ALIGNMENT_OVERRIDE "DARSHAN_MEMALIGN"
#ifdef __DARSHAN_MAX_RECORDS
#define DARSHAN_CORE_MAX_RECORDS __DARSHAN_MAX_RECORDS
#else
#define DARSHAN_CORE_MAX_RECORDS 2048
#endif
/* TODO: revisit this default size if we change memory per module */
#define DARSHAN_CORE_COMP_BUF_SIZE (2 * 1024 * 1024)
......
......@@ -102,6 +102,9 @@
/* Location to store log files at run time */
#undef __DARSHAN_LOG_PATH
/* Maximum Darshan records to track at runtime */
#undef __DARSHAN_MAX_RECORDS
/* Memory alignment in bytes */
#undef __DARSHAN_MEM_ALIGNMENT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment