[Darshan-commits] [Git][darshan/darshan][dev-modular] make maximum runtime records configurable

Shane Snyder xgitlab at cels.anl.gov
Thu Oct 29 16:14:01 CDT 2015


Shane Snyder pushed to branch dev-modular at darshan / darshan


Commits:
48352d36 by Shane Snyder at 2015-10-29T16:13:28Z
make maximum runtime records configurable

use --with-max-records at configure time to change from default
of 2048 records

- - - - -


4 changed files:

- darshan-runtime/configure
- darshan-runtime/configure.in
- darshan-runtime/darshan-core.h
- darshan-runtime/darshan-runtime-config.h.in


Changes:

=====================================
darshan-runtime/configure
=====================================
--- a/darshan-runtime/configure
+++ b/darshan-runtime/configure
@@ -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"
 
 


=====================================
darshan-runtime/configure.in
=====================================
--- a/darshan-runtime/configure.in
+++ b/darshan-runtime/configure.in
@@ -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)


=====================================
darshan-runtime/darshan-core.h
=====================================
--- a/darshan-runtime/darshan-core.h
+++ b/darshan-runtime/darshan-core.h
@@ -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)


=====================================
darshan-runtime/darshan-runtime-config.h.in
=====================================
--- a/darshan-runtime/darshan-runtime-config.h.in
+++ b/darshan-runtime/darshan-runtime-config.h.in
@@ -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
 



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/48352d366d6530b22d3fc4a2821c8b7a7e3ea214
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20151029/87d8a219/attachment.html>


More information about the Darshan-commits mailing list