Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
ba451e9a
Commit
ba451e9a
authored
Nov 24, 2015
by
Shane Snyder
Browse files
rework header org. for module-specific versions
parent
8731ade9
Changes
27
Show whitespace changes
Inline
Side-by-side
darshan-bgq-log-format.h
View file @
ba451e9a
...
...
@@ -7,8 +7,8 @@
#ifndef __DARSHAN_BGQ_LOG_FORMAT_H
#define __DARSHAN_BGQ_LOG_FORMAT_H
#include
"darshan-
log
-
format
.h"
/* current BGQ
log
format
version */
#define DARSHAN_BGQ_VER 1
#define BGQ_COUNTERS \
X(BGQ_CSJOBID, "control system jobid") \
...
...
darshan-hdf5-log-format.h
View file @
ba451e9a
...
...
@@ -7,7 +7,8 @@
#ifndef __DARSHAN_HDF5_LOG_FORMAT_H
#define __DARSHAN_HDF5_LOG_FORMAT_H
#include
"darshan-log-format.h"
/* current HDF5 log format version */
#define DARSHAN_HDF5_VER 1
#define HDF5_COUNTERS \
/* count of HDF5 opens */
\
...
...
darshan-log-format.h
View file @
ba451e9a
...
...
@@ -31,44 +31,9 @@
/* max length of exe string within job record (not counting '\0') */
#define DARSHAN_EXE_LEN (DARSHAN_JOB_RECORD_SIZE - sizeof(struct darshan_job) - 1)
/* max number of modules that can be used in a darshan log */
#define DARSHAN_MAX_MODS 16
/* X-macro for keeping module ordering consistent */
/* NOTE: first val used to define module enum values,
* second val used to define module name strings, and
* third val is used to provide the name of a
* corresponding logutils structure for parsing module
* data out of the log file (only used in darshan-util
* component -- NULL can be passed if there are no
* logutil definitions)
*/
#define DARSHAN_MODULE_IDS \
X(DARSHAN_NULL_MOD, "NULL", NULL) \
X(DARSHAN_POSIX_MOD, "POSIX", &posix_logutils) \
X(DARSHAN_MPIIO_MOD, "MPI-IO", &mpiio_logutils) \
X(DARSHAN_HDF5_MOD, "HDF5", &hdf5_logutils) \
X(DARSHAN_PNETCDF_MOD, "PNETCDF", &pnetcdf_logutils) \
X(DARSHAN_BGQ_MOD, "BG/Q", &bgq_logutils)
/* unique identifiers to distinguish between available darshan modules */
/* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]
* - order of ids control module shutdown order (and consequently, order in log file)
*/
#define X(a, b, c) a,
typedef
enum
{
DARSHAN_MODULE_IDS
}
darshan_module_id
;
#undef X
/* module name strings */
#define X(a, b, c) b,
static
char
*
const
darshan_module_names
[]
=
{
DARSHAN_MODULE_IDS
};
#undef X
/* simple macros for accessing module flag bitfields */
#define DARSHAN_MOD_FLAG_SET(flags, id) flags = (flags | (1 << id))
#define DARSHAN_MOD_FLAG_UNSET(flags, id) flags = (flags & ~(1 << id))
...
...
@@ -105,6 +70,7 @@ struct darshan_header
uint32_t
partial_flag
;
struct
darshan_log_map
rec_map
;
struct
darshan_log_map
mod_map
[
DARSHAN_MAX_MODS
];
uint32_t
mod_ver
[
DARSHAN_MAX_MODS
];
};
/* job-level metadata stored for this application */
...
...
@@ -126,4 +92,61 @@ struct darshan_record
darshan_record_id
id
;
};
/************************************************
*** module-specific includes and definitions ***
************************************************/
#include
"darshan-null-log-format.h"
#include
"darshan-posix-log-format.h"
#include
"darshan-mpiio-log-format.h"
#include
"darshan-hdf5-log-format.h"
#include
"darshan-pnetcdf-log-format.h"
#include
"darshan-bgq-log-format.h"
/* X-macro for keeping module ordering consistent */
/* NOTE: first val used to define module enum values,
* second val used to define module name strings,
* third val is the log format version for the module,
* and fourth val is used to provide the name of a
* corresponding logutils structure for parsing module
* data out of the log file (only used in darshan-util
* component -- NULL can be passed if there are no
* logutil definitions)
*/
#define DARSHAN_MODULE_IDS \
X(DARSHAN_NULL_MOD, "NULL", DARSHAN_NULL_VER, NULL) \
X(DARSHAN_POSIX_MOD, "POSIX", DARSHAN_POSIX_VER, &posix_logutils) \
X(DARSHAN_MPIIO_MOD, "MPI-IO", DARSHAN_MPIIO_VER, &mpiio_logutils) \
X(DARSHAN_HDF5_MOD, "HDF5", DARSHAN_HDF5_VER, &hdf5_logutils) \
X(DARSHAN_PNETCDF_MOD, "PNETCDF", DARSHAN_PNETCDF_VER, &pnetcdf_logutils) \
X(DARSHAN_BGQ_MOD, "BG/Q", DARSHAN_BGQ_VER, &bgq_logutils)
/* unique identifiers to distinguish between available darshan modules */
/* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]
* - order of ids control module shutdown order (and consequently, order in log file)
*/
#define X(a, b, c, d) a,
typedef
enum
{
DARSHAN_MODULE_IDS
}
darshan_module_id
;
#undef X
/* module name strings */
#define X(a, b, c, d) b,
static
char
*
const
darshan_module_names
[]
=
{
DARSHAN_MODULE_IDS
};
#undef X
/* module version numbers */
#define X(a, b, c, d) c,
static
const
int
darshan_module_versions
[]
=
{
DARSHAN_MODULE_IDS
};
#undef X
#endif
/* __DARSHAN_LOG_FORMAT_H */
darshan-mpiio-log-format.h
View file @
ba451e9a
...
...
@@ -7,7 +7,8 @@
#ifndef __DARSHAN_MPIIO_LOG_FORMAT_H
#define __DARSHAN_MPIIO_LOG_FORMAT_H
#include
"darshan-log-format.h"
/* current MPI-IO log format version */
#define DARSHAN_MPIIO_VER 1
/* TODO: maybe use a counter to track cases in which a derived datatype is used? */
...
...
darshan-null-log-format.h
View file @
ba451e9a
...
...
@@ -7,7 +7,8 @@
#ifndef __DARSHAN_NULL_LOG_FORMAT_H
#define __DARSHAN_NULL_LOG_FORMAT_H
#include
"darshan-log-format.h"
/* current log format version, to support backwards compatibility */
#define DARSHAN_NULL_VER 1
#define NULL_COUNTERS \
/* count of number of 'bar' function calls */
\
...
...
darshan-pnetcdf-log-format.h
View file @
ba451e9a
...
...
@@ -7,7 +7,8 @@
#ifndef __DARSHAN_PNETCDF_LOG_FORMAT_H
#define __DARSHAN_PNETCDF_LOG_FORMAT_H
#include
"darshan-log-format.h"
/* current PNETCDF log format version */
#define DARSHAN_PNETCDF_VER 1
#define PNETCDF_COUNTERS \
/* count of PNETCDF independent opens */
\
...
...
darshan-posix-log-format.h
View file @
ba451e9a
...
...
@@ -6,7 +6,8 @@
#ifndef __DARSHAN_POSIX_LOG_FORMAT_H
#define __DARSHAN_POSIX_LOG_FORMAT_H
#include
"darshan-log-format.h"
/* current POSIX log format version */
#define DARSHAN_POSIX_VER 1
#define POSIX_COUNTERS \
/* count of posix opens */
\
...
...
darshan-runtime/lib/darshan-bgq.c
View file @
ba451e9a
...
...
@@ -16,7 +16,6 @@
#include
"uthash.h"
#include
"darshan.h"
#include
"darshan-bgq-log-format.h"
#include
"darshan-dynamic.h"
#include
<mpix.h>
...
...
darshan-runtime/lib/darshan-hdf5.c
View file @
ba451e9a
...
...
@@ -22,7 +22,6 @@
#include
"uthash.h"
#include
"darshan.h"
#include
"darshan-hdf5-log-format.h"
#include
"darshan-dynamic.h"
/* hope this doesn't change any time soon */
...
...
darshan-runtime/lib/darshan-mpiio.c
View file @
ba451e9a
...
...
@@ -23,7 +23,6 @@
#include
"uthash.h"
#include
"darshan.h"
#include
"darshan-mpiio-log-format.h"
#include
"darshan-dynamic.h"
/* The mpiio_file_runtime structure maintains necessary runtime metadata
...
...
darshan-runtime/lib/darshan-null.c
View file @
ba451e9a
...
...
@@ -16,7 +16,6 @@
#include
"uthash.h"
#include
"darshan.h"
#include
"darshan-null-log-format.h"
/* The "NULL" module is an example instrumentation module implementation provided
* with Darshan, primarily to indicate how arbitrary modules may be integrated
...
...
darshan-runtime/lib/darshan-pnetcdf.c
View file @
ba451e9a
...
...
@@ -22,7 +22,6 @@
#include
"uthash.h"
#include
"darshan.h"
#include
"darshan-pnetcdf-log-format.h"
#include
"darshan-dynamic.h"
DARSHAN_FORWARD_DECL
(
ncmpi_create
,
int
,
(
MPI_Comm
comm
,
const
char
*
path
,
int
cmode
,
MPI_Info
info
,
int
*
ncidp
));
...
...
darshan-runtime/lib/darshan-posix.c
View file @
ba451e9a
...
...
@@ -30,7 +30,6 @@
#include
"utlist.h"
#include
"darshan.h"
#include
"darshan-posix-log-format.h"
#include
"darshan-dynamic.h"
#ifndef HAVE_OFF64_T
...
...
darshan-util/Makefile.in
View file @
ba451e9a
...
...
@@ -93,10 +93,10 @@ lookup3.o: lookup3.c
$(CC)
$(CFLAGS)
-c
$<
-o
$@
darshan-analyzer
:
darshan-analyzer.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
^
-o
$@
$(LIBS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
<
libdarshan-util.a
-o
$@
$(LIBS)
darshan-convert
:
darshan-convert.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) libdarshan-util.a lookup3.o | uthash-1.9.2
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
^
-o
$@
$(LIBS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
<
lookup3.o libdarshan-util.a
-o
$@
$(LIBS)
#darshan-diff: darshan-diff.o $(DARSHAN_LOG_FORMAT) darshan-logutils.o darshan-logutils.h
# $(CC) $(CFLAGS) $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS)
...
...
@@ -104,7 +104,7 @@ darshan-convert: darshan-convert.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) libd
# $(CC) $(CFLAGS) -c $< -o $@
darshan-parser
:
darshan-parser.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
^
-o
$@
$(LIBS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
$
<
libdarshan-util.a
-o
$@
$(LIBS)
#test/gztest: test/gztest.c mktestdir
# $(CC) $(CFLAGS) $(LDFLAGS) -lz $< -o $@
...
...
darshan-util/darshan-bgq-logutils.c
View file @
ba451e9a
...
...
@@ -17,7 +17,7 @@
#include
<fcntl.h>
#include
<errno.h>
#include
"darshan-
bgq-
logutils.h"
#include
"darshan-logutils.h"
/* counter name strings for the POSIX module */
#define X(a, b) #a,
...
...
darshan-util/darshan-bgq-logutils.h
View file @
ba451e9a
...
...
@@ -7,9 +7,6 @@
#ifndef __DARSHAN_BGQ_LOG_UTILS_H
#define __DARSHAN_BGQ_LOG_UTILS_H
#include
"darshan-logutils.h"
#include
"darshan-bgq-log-format.h"
extern
char
*
bgq_counter_names
[];
extern
char
*
bgq_f_counter_names
[];
...
...
darshan-util/darshan-hdf5-logutils.c
View file @
ba451e9a
...
...
@@ -17,7 +17,7 @@
#include
<fcntl.h>
#include
<errno.h>
#include
"darshan-
hdf5-
logutils.h"
#include
"darshan-logutils.h"
/* counter name strings for the HDF5 module */
#define X(a) #a,
...
...
darshan-util/darshan-hdf5-logutils.h
View file @
ba451e9a
...
...
@@ -7,9 +7,6 @@
#ifndef __DARSHAN_HDF5_LOG_UTILS_H
#define __DARSHAN_HDF5_LOG_UTILS_H
#include
"darshan-logutils.h"
#include
"darshan-hdf5-log-format.h"
extern
char
*
hdf5_counter_names
[];
extern
char
*
hdf5_f_counter_names
[];
...
...
darshan-util/darshan-logutils.c
View file @
ba451e9a
...
...
@@ -87,7 +87,7 @@ static int darshan_log_dzload(darshan_fd fd, struct darshan_log_map map);
static
int
darshan_log_dzunload
(
darshan_fd
fd
,
struct
darshan_log_map
*
map_p
);
/* each module's implementation of the darshan logutil functions */
#define X(a, b, c)
c
,
#define X(a, b, c
, d
)
d
,
struct
darshan_mod_logutil_funcs
*
mod_logutils
[
DARSHAN_MAX_MODS
]
=
{
DARSHAN_MODULE_IDS
...
...
darshan-util/darshan-mpiio-logutils.c
View file @
ba451e9a
...
...
@@ -17,7 +17,7 @@
#include
<fcntl.h>
#include
<errno.h>
#include
"darshan-
mpiio-
logutils.h"
#include
"darshan-logutils.h"
/* counter name strings for the MPI-IO module */
#define X(a) #a,
...
...
Prev
1
2
Next
Shane Snyder
@ssnyder
mentioned in issue
#168 (closed)
·
Nov 25, 2015
mentioned in issue
#168 (closed)
mentioned in issue #168
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment