[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-172-g328f68b
Service Account
git at mcs.anl.gov
Wed Sep 9 22:45:34 CDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, dev-modular has been updated
via 328f68bd9a8faa7128423f6589bb047d1ce4f6f8 (commit)
from 10068d0076c8e93783ca2ebffcdd7725c4b4ce51 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 328f68bd9a8faa7128423f6589bb047d1ce4f6f8
Author: Shane Snyder <snyder at cetuslac1.fst.alcf.anl.gov>
Date: Thu Sep 10 03:43:45 2015 +0000
allow modules to statically init
-----------------------------------------------------------------------
Summary of changes:
darshan-runtime/Makefile.in | 18 ++++++++++--------
darshan-runtime/configure | 2 +-
darshan-runtime/lib/darshan-bgq.c | 4 ----
darshan-runtime/lib/darshan-core.c | 28 +++++++++++++++++++++++-----
4 files changed, 34 insertions(+), 18 deletions(-)
Diff of changes:
diff --git a/darshan-runtime/Makefile.in b/darshan-runtime/Makefile.in
index 85dbffb..40a3d42 100644
--- a/darshan-runtime/Makefile.in
+++ b/darshan-runtime/Makefile.in
@@ -23,22 +23,24 @@ ifndef DISABLE_LDPRELOAD
all: lib/libdarshan.so lib/darshan-null.po
endif
+VPATH = $(srcdir)
+
+CFLAGS = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I ../ -I $(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE
+
+CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE -shared -fpic -DPIC -DDARSHAN_PRELOAD
+
+LIBS = -lz @LIBBZ2@
+
static-mod-objs = lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o
dynamic-mod-objs = lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po
ifdef DARSHAN_USE_BGQ
static-mod-objs += lib/darshan-bgq.o
dynamic-mod-objs += lib/darshan-bgq.po
+CFLAGS += -DDARSHAN_BGQ
+CFLAGS_SHARED += -DDARSHAN_BGQ
endif
-VPATH = $(srcdir)
-
-CFLAGS = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I ../ -I $(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE
-
-CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE -shared -fpic -DPIC -DDARSHAN_PRELOAD
-
-LIBS = -lz @LIBBZ2@
-
lib::
@mkdir -p $@
diff --git a/darshan-runtime/configure b/darshan-runtime/configure
index 9e206a3..b7929bc 100755
--- a/darshan-runtime/configure
+++ b/darshan-runtime/configure
@@ -4248,7 +4248,7 @@ $as_echo "no" >&6; }
MPICH_LIB_OLD=0
fi
-# check to see if the bgq instrumentation module should be built
+# check to see whether the bgq instrumentation module should be built
# Check whether --enable-bgq_mod was given.
if test "${enable_bgq_mod+set}" = set; then :
enableval=$enable_bgq_mod;
diff --git a/darshan-runtime/lib/darshan-bgq.c b/darshan-runtime/lib/darshan-bgq.c
index a7bca70..b6ee623 100644
--- a/darshan-runtime/lib/darshan-bgq.c
+++ b/darshan-runtime/lib/darshan-bgq.c
@@ -18,11 +18,9 @@
#include "darshan.h"
#include "darshan-bgq-log-format.h"
-#ifdef __bgq__
#include <spi/include/kernel/location.h>
#include <spi/include/kernel/process.h>
#include <firmware/include/personality.h>
-#endif
/*
* Simple module which captures BG/Q hardware specific information about
@@ -70,7 +68,6 @@ static void bgq_record_reduction_op(void* infile_v,void* inoutfile_v,int *len,MP
*/
static void capture(struct darshan_bgq_record *rec)
{
-#ifdef __bgq__
Personality_t person;
int r;
@@ -96,7 +93,6 @@ static void capture(struct darshan_bgq_record *rec)
rec->counters[BGQ_DDRPERNODE] = person.DDR_Config.DDRSizeMB;
}
-#endif
rec->rank = my_rank;
rec->fcounters[BGQ_F_TIMESTAMP] = darshan_core_wtime();
diff --git a/darshan-runtime/lib/darshan-core.c b/darshan-runtime/lib/darshan-core.c
index 07bb151..b534a1f 100644
--- a/darshan-runtime/lib/darshan-core.c
+++ b/darshan-runtime/lib/darshan-core.c
@@ -55,6 +55,21 @@ char* darshan_path_exclusions[] = {
NULL
};
+#ifdef DARSHAN_BGQ
+extern void bgq_runtime_initialize();
+#endif
+
+/* array of init functions for modules which need to be statically
+ * initialized by darshan at startup time
+ */
+void (*mod_static_init_fns[])(void) =
+{
+#ifdef DARSHAN_BGQ
+ &bgq_runtime_initialize,
+#endif
+ NULL
+};
+
#define DARSHAN_CORE_LOCK() pthread_mutex_lock(&darshan_core_mutex)
#define DARSHAN_CORE_UNLOCK() pthread_mutex_unlock(&darshan_core_mutex)
@@ -196,6 +211,14 @@ void darshan_core_initialize(int argc, char **argv)
}
}
+ /* maybe bootstrap modules with static initializers */
+ i = 0;
+ while(mod_static_init_fns[i])
+ {
+ (*mod_static_init_fns[i])();
+ i++;
+ }
+
if(internal_timing_flag)
{
init_time = DARSHAN_MPI_CALL(PMPI_Wtime)() - init_start;
@@ -208,11 +231,6 @@ void darshan_core_initialize(int argc, char **argv)
}
}
-#ifdef __bgq__
- extern void bgq_runtime_initialize();
- bgq_runtime_initialize();
-#endif
-
return;
}
hooks/post-receive
--
More information about the Darshan-commits
mailing list