[Darshan-commits] [Git][darshan/darshan][autoperf-mod] 2 commits: Initial runtime support for autoperf

Kevin Harms xgitlab at cels.anl.gov
Mon Feb 5 15:47:15 CST 2018


Kevin Harms pushed to branch autoperf-mod at darshan / darshan


Commits:
b757c437 by Kevin Harms at 2018-01-25T16:25:52+00:00
Initial runtime support for autoperf

- - - - -
6edae2c2 by Kevin Harms at 2018-02-05T21:47:08+00:00
add util support for AutoPerf and define new log printing functions for different types

- - - - -


6 changed files:

- darshan-log-format.h
- darshan-runtime/Makefile.in
- darshan-runtime/configure.in
- darshan-runtime/lib/darshan-core.c
- darshan-util/Makefile.in
- darshan-util/darshan-logutils.h


Changes:

=====================================
darshan-log-format.h
=====================================
--- a/darshan-log-format.h
+++ b/darshan-log-format.h
@@ -119,6 +119,9 @@ struct darshan_base_record
 #include "darshan-stdio-log-format.h"
 /* DXT */
 #include "darshan-dxt-log-format.h"
+#ifdef DARSHAN_USE_APXC
+#include "darshan-apxc-log-format.h"
+#endif
 
 /* X-macro for keeping module ordering consistent */
 /* NOTE: first val used to define module enum values, 
@@ -139,9 +142,9 @@ struct darshan_base_record
     X(DARSHAN_BGQ_MOD,      "BG/Q",     DARSHAN_BGQ_VER,        &bgq_logutils) \
     X(DARSHAN_LUSTRE_MOD,   "LUSTRE",   DARSHAN_LUSTRE_VER,     &lustre_logutils) \
     X(DARSHAN_STDIO_MOD,    "STDIO",    DARSHAN_STDIO_VER,      &stdio_logutils) \
-    /* DXT */ \
     X(DXT_POSIX_MOD,       "DXT_POSIX",  DXT_POSIX_VER,         &dxt_posix_logutils) \
-    X(DXT_MPIIO_MOD,       "DXT_MPIIO",  DXT_MPIIO_VER,         &dxt_mpiio_logutils)
+    X(DXT_MPIIO_MOD,       "DXT_MPIIO",  DXT_MPIIO_VER,         &dxt_mpiio_logutils) \
+    X(DARSHAN_APXC_MOD,    "DARSHAN_APXC", DARSHAN_APXC_VER,    &apxc_logutils) 
 
 /* unique identifiers to distinguish between available darshan modules */
 /* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]


=====================================
darshan-runtime/Makefile.in
=====================================
--- a/darshan-runtime/Makefile.in
+++ b/darshan-runtime/Makefile.in
@@ -20,6 +20,7 @@ DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@
 ENABLE_MMAP_LOGS = @ENABLE_MMAP_LOGS@
 DARSHAN_USE_BGQ = @DARSHAN_USE_BGQ@
 DARSHAN_USE_LUSTRE = @DARSHAN_USE_LUSTRE@
+DARSHAN_USE_APXC = @DARSHAN_USE_APXC@
 DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
 DARSHAN_VERSION = @DARSHAN_VERSION@
 


=====================================
darshan-runtime/configure.in
=====================================
--- a/darshan-runtime/configure.in
+++ b/darshan-runtime/configure.in
@@ -63,7 +63,7 @@ AC_ARG_ENABLE(
 AC_ARG_ENABLE(
     [autoperf-crayxc],
     [  --enable-autoperf-crayxc    Enables compilation and use of the AutoPerf Cray XC module],
-    [enable_apxc_mod=check],
+    [enable_autoperf_crayxc=yes],
     []
 )
 
@@ -169,7 +169,8 @@ if test x$enable_lustre_mod != xno; then
             []))
 fi
 
-if test x$enable_apxc_mod = xyes; then
+AC_MSG_NOTICE([value for $enable_autoperf_crayxc])
+if test x$enable_autoperf_crayxc = xyes; then
     DARSHAN_USE_APXC=1
 fi
 
@@ -391,6 +392,7 @@ AC_SUBST(DARSHAN_VERSION)
 AC_SUBST(MPICH_LIB_OLD)
 AC_SUBST(DARSHAN_USE_BGQ)
 AC_SUBST(DARSHAN_USE_LUSTRE)
+AC_SUBST(DARSHAN_USE_APXC)
 AC_SUBST(BUILD_HDF5_MODULE)
 AC_SUBST(DARSHAN_HDF5_LD_OPTS)
 AC_OUTPUT(Makefile


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
--- a/darshan-runtime/lib/darshan-core.c
+++ b/darshan-runtime/lib/darshan-core.c
@@ -79,8 +79,8 @@ char** user_darshan_path_exclusions = NULL;
 extern void bgq_runtime_initialize();
 #endif
 
-#ifdef DARSHAN_CRAYXC
-extern void crayxc_runtime_intialize();
+#ifdef DARSHAN_USE_APXC
+extern void apxc_runtime_initialize();
 #endif
 
 /* array of init functions for modules which need to be statically
@@ -91,8 +91,8 @@ void (*mod_static_init_fns[])(void) =
 #ifdef DARSHAN_BGQ
     &bgq_runtime_initialize,
 #endif
-#ifdef DARSHAN_CRAYXC
-    &crayxc_runtime_intialize,
+#ifdef DARSHAN_USE_APXC
+    &apxc_runtime_initialize,
 #endif
     NULL
 };


=====================================
darshan-util/Makefile.in
=====================================
--- a/darshan-util/Makefile.in
+++ b/darshan-util/Makefile.in
@@ -12,6 +12,8 @@ bindir = $(DESTDIR)@bindir@
 libdir = $(DESTDIR)@libdir@
 pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
 
+DARSHAN_USE_APXC = @DARSHAN_USE_APXC@
+
 DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
 DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h $(srcdir)/../darshan-bgq-log-format.h $(srcdir)/../darshan-lustre-log-format.h $(srcdir)/../darshan-stdio-log-format.h $(srcdir)/../darshan-dxt-log-format.h
 DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h darshan-bgq-logutils.h darshan-lustre-logutils.h darshan-stdio-logutils.h darshan-dxt-logutils.h
@@ -40,6 +42,10 @@ AR=@AR@
 
 LIBS = -lz @LIBBZ2@
 
+ifdef DARSHAN_USE_APXC
+include $(srcdir)/../modules/autoperf/crayxc/util/Makefile.darshan
+endif
+
 mktestdir::
 	mkdir -p test
 


=====================================
darshan-util/darshan-logutils.h
=====================================
--- a/darshan-util/darshan-logutils.h
+++ b/darshan-util/darshan-logutils.h
@@ -138,6 +138,10 @@ extern struct darshan_mod_logutil_funcs *mod_logutils[];
 /* DXT */
 #include "darshan-dxt-logutils.h"
 
+#ifdef DARSHAN_USE_APXC
+#include "darshan-apxc-logutils.h"
+#endif
+
 darshan_fd darshan_log_open(const char *name);
 darshan_fd darshan_log_create(const char *name, enum darshan_comp_type comp_type,
     int partial_flag);
@@ -171,6 +175,22 @@ void darshan_log_print_version_warnings(const char *version_string);
         __file_name, __mnt_pt, __fs_type); \
 } while(0)
 
+#define DARSHAN_I_COUNTER_PRINT(__mod_name, __rank, __file_id, \
+                              __counter, __counter_val, __file_name, \
+                              __mnt_pt, __fs_type) do { \
+    printf("%s\t%" PRId64 "\t%" PRIu64 "\t%s\t%d\t%s\t%s\t%s\n", \
+        __mod_name, __rank, __file_id, __counter, __counter_val, \
+        __file_name, __mnt_pt, __fs_type); \
+} while(0)
+
+#define DARSHAN_S_COUNTER_PRINT(__mod_name, __rank, __file_id, \
+                              __counter, __counter_val, __file_name, \
+                              __mnt_pt, __fs_type) do { \
+    printf("%s\t%" PRId64 "\t%" PRIu64 "\t%s\t%s\t%s\t%s\t%s\n", \
+        __mod_name, __rank, __file_id, __counter, __counter_val, \
+        __file_name, __mnt_pt, __fs_type); \
+} while(0)
+
 #define DARSHAN_F_COUNTER_PRINT(__mod_name, __rank, __file_id, \
                                 __counter, __counter_val, __file_name, \
                                 __mnt_pt, __fs_type) do { \



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/86500f11cbbf65289545c35bab7ad96b5958d336...6edae2c26f070b4a2f7ad86b72efdc94c52ec52d

---
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/86500f11cbbf65289545c35bab7ad96b5958d336...6edae2c26f070b4a2f7ad86b72efdc94c52ec52d
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20180205/5923787c/attachment-0001.html>


More information about the Darshan-commits mailing list