[Darshan-commits] [Git][darshan/darshan][dev-modular] 5 commits: update runtime docs to give info on upgrading
Shane Snyder
xgitlab at cels.anl.gov
Mon Jan 4 15:05:46 CST 2016
Shane Snyder pushed to branch dev-modular at darshan / darshan
Commits:
2feaff78 by Shane Snyder at 2016-01-04T09:19:52Z
update runtime docs to give info on upgrading
- - - - -
64978d11 by Shane Snyder at 2016-01-04T09:50:41Z
bug fix for resolving mpi_gather in shared lib
- - - - -
86533a49 by Shane Snyder at 2016-01-04T12:46:33Z
fix typos in counter descriptions
- - - - -
d4413b4e by Shane Snyder at 2016-01-04T13:36:29Z
better error handling for opening old log files
- - - - -
72937c9a by Shane Snyder at 2016-01-04T15:05:02Z
more doc updates
- - - - -
10 changed files:
- darshan-runtime/darshan-dynamic.h
- darshan-runtime/doc/darshan-runtime.txt
- darshan-runtime/lib/darshan-core-init-finalize.c
- darshan-util/darshan-bgq-logutils.c
- darshan-util/darshan-hdf5-logutils.c
- darshan-util/darshan-logutils.c
- darshan-util/darshan-mpiio-logutils.c
- darshan-util/darshan-null-logutils.c
- darshan-util/darshan-pnetcdf-logutils.c
- darshan-util/darshan-posix-logutils.c
Changes:
=====================================
darshan-runtime/darshan-dynamic.h
=====================================
--- a/darshan-runtime/darshan-dynamic.h
+++ b/darshan-runtime/darshan-dynamic.h
@@ -114,10 +114,22 @@ DARSHAN_EXTERN_DECL(PMPI_Type_get_envelope, int, (MPI_Datatype datatype, int *nu
DARSHAN_EXTERN_DECL(PMPI_Type_size, int, (MPI_Datatype datatype, int *size));
DARSHAN_EXTERN_DECL(PMPI_Op_create, int, (MPI_User_function *function, int commute, MPI_Op *op));
DARSHAN_EXTERN_DECL(PMPI_Op_free, int, (MPI_Op *op));
+#ifdef HAVE_MPIIO_CONST
+DARSHAN_EXTERN_DECL(PMPI_Reduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+#else
DARSHAN_EXTERN_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+#endif
+#ifdef HAVE_MPIIO_CONST
+DARSHAN_EXTERN_DECL(PMPI_Send, int, (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+#else
DARSHAN_EXTERN_DECL(PMPI_Send, int, (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+#endif
DARSHAN_EXTERN_DECL(PMPI_Recv, int, (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status));
+#ifdef HAVE_MPIIO_CONST
DARSHAN_EXTERN_DECL(PMPI_Gather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+#else
+DARSHAN_EXTERN_DECL(PMPI_Gather, int, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+#endif
#endif
=====================================
darshan-runtime/doc/darshan-runtime.txt
=====================================
--- a/darshan-runtime/doc/darshan-runtime.txt
+++ b/darshan-runtime/doc/darshan-runtime.txt
@@ -466,6 +466,40 @@ older versions of Open MPI, please refer to the following mailing list discussio
http://www.open-mpi.org/community/lists/devel/2013/01/11907.php
+== Upgrading to Darshan 3.x from 2.x
+
+Beginning with Darshan 3.0.0, Darshan has been rewritten to modularize its runtime environment
+and log file format to simplify the addition of new I/O characterization data. The process of
+compiling and installing the Darshan 3.x source code should essentially be identical to this
+process on Darshan 2.x. Therefore, the installation recipes given in the previous section
+should work irrespective of the Darshan version being used. Similarly, the manner in which
+Darshan is used should be the same across versions -- the sections in this document regarding
+Darshan link:darshan-runtime.html#_environment_preparation[environment preparation],
+instrumenting link:darshan-runtime.html#_instrumenting_statically_linked_applications[statically
+linked applications] and link:darshan-runtime.html#_instrumenting_dynamically_linked_applications[
+dynamically linked applications], and using link:darshan-runtime.html#_runtime_environment_variables[
+runtime environment variables] are equally applicable to both versions.
+
+However, we do provide some suggestions and expectations for system administrators to keep in
+mind when upgrading to Darshan 3.x:
+
+* Log file compatibility was broken in the upgrade, and thus 3.x log utilities do not
+work directly with logs generated by 2.x versions of Darshan (and vice versa).
+ - There is currently no tool for converting 2.x logs into the 3.x log format.
+ - The `darshan-logutils` library will provide error messages to indicate whether a given
+log file is incompatible with the correspnonding library version.
+
+* The darshan log file extension has been changed from `.darshan.gz` (or `.darshan.bz2` for
+log files converted to use bzip2 compression) to `.darshan`.
+ - A field in the Darshan log header is used to indicate whether a log is compressed using
+libz or bzip2 compression.
+
+* We encourage administrators to use the same log file directory for version 3.x as had been
+used for version 2.x.
+ - Within this directory, the determination on which set of log utilities (version 2.x
+or version 3.x) to use can be based on the file extension for a given log (as explained
+above).
+
== Runtime environment variables
The Darshan library honors the following environment variables to modify
=====================================
darshan-runtime/lib/darshan-core-init-finalize.c
=====================================
--- a/darshan-runtime/lib/darshan-core-init-finalize.c
+++ b/darshan-runtime/lib/darshan-core-init-finalize.c
@@ -120,9 +120,22 @@ DARSHAN_FORWARD_DECL(PMPI_Type_get_envelope, int, (MPI_Datatype datatype, int *n
DARSHAN_FORWARD_DECL(PMPI_Type_size, int, (MPI_Datatype datatype, int *size));
DARSHAN_FORWARD_DECL(PMPI_Op_create, int, (MPI_User_function *function, int commute, MPI_Op *op));
DARSHAN_FORWARD_DECL(PMPI_Op_free, int, (MPI_Op *op));
+#ifdef HAVE_MPIIO_CONST
+DARSHAN_FORWARD_DECL(PMPI_Reduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+#else
DARSHAN_FORWARD_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+#endif
+#ifdef HAVE_MPIIO_CONST
+DARSHAN_FORWARD_DECL(PMPI_Send, int, (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+#else
DARSHAN_FORWARD_DECL(PMPI_Send, int, (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+#endif
DARSHAN_FORWARD_DECL(PMPI_Recv, int, (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status));
+#ifdef HAVE_MPIIO_CONST
+DARSHAN_FORWARD_DECL(PMPI_Gather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+#else
+DARSHAN_FORWARD_DECL(PMPI_Gather, int, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+#endif
void resolve_mpi_symbols (void)
{
@@ -182,6 +195,7 @@ void resolve_mpi_symbols (void)
MAP_OR_FAIL(PMPI_Reduce);
MAP_OR_FAIL(PMPI_Send);
MAP_OR_FAIL(PMPI_Recv);
+ MAP_OR_FAIL(PMPI_Gather);
return;
}
=====================================
darshan-util/darshan-bgq-logutils.c
=====================================
--- a/darshan-util/darshan-bgq-logutils.c
+++ b/darshan-util/darshan-bgq-logutils.c
@@ -116,7 +116,7 @@ static void darshan_log_print_bgq_rec(void *file_rec, char *file_name,
static void darshan_log_print_bgq_description()
{
- printf("\n# desription of BGQ counters:\n");
+ printf("\n# description of BGQ counters:\n");
printf("# BGQ_CSJOBID: BGQ control system job ID.\n");
printf("# BGQ_NNODES: number of BGQ compute nodes for this job.\n");
printf("# BGQ_RANKSPERNODE: number of MPI ranks per compute node.\n");
=====================================
darshan-util/darshan-hdf5-logutils.c
=====================================
--- a/darshan-util/darshan-hdf5-logutils.c
+++ b/darshan-util/darshan-hdf5-logutils.c
@@ -116,7 +116,7 @@ static void darshan_log_print_hdf5_file(void *file_rec, char *file_name,
static void darshan_log_print_hdf5_description()
{
- printf("\n# desription of HDF5 counters:\n");
+ printf("\n# description of HDF5 counters:\n");
printf("# HDF5_OPENS: HDF5 file open operation counts.\n");
printf("# HDF5_F_OPEN_TIMESTAMP: timestamp of first HDF5 file open.\n");
printf("# HDF5_F_CLOSE_TIMESTAMP: timestamp of last HDF5 file close.\n");
=====================================
darshan-util/darshan-logutils.c
=====================================
--- a/darshan-util/darshan-logutils.c
+++ b/darshan-util/darshan-logutils.c
@@ -133,6 +133,7 @@ darshan_fd darshan_log_open(const char *name)
ret = darshan_log_getheader(tmp_fd);
if(ret < 0)
{
+ fprintf(stderr, "Error: failed to read darshan log file header.\n");
close(tmp_fd->state->fildes);
free(tmp_fd->state);
free(tmp_fd);
@@ -845,6 +846,30 @@ static int darshan_log_getheader(darshan_fd fd)
return(-1);
}
+ /* read the version number so we know how to process this log */
+ ret = darshan_log_read(fd, &fd->version, 8);
+ if(ret < 8)
+ {
+ fprintf(stderr, "Error: invalid log file (failed to read version).\n");
+ return(-1);
+ }
+
+ /* other log file versions can be detected and handled here */
+ if(strcmp(fd->version, "3.00"))
+ {
+ fprintf(stderr, "Error: incompatible darshan file.\n");
+ fprintf(stderr, "Error: expected version %s\n", DARSHAN_LOG_VERSION);
+ return(-1);
+ }
+
+ /* seek back so we can read the entire header */
+ ret = darshan_log_seek(fd, 0);
+ if(ret < 0)
+ {
+ fprintf(stderr, "Error: unable to seek in darshan log file.\n");
+ return(-1);
+ }
+
/* read uncompressed header from log file */
ret = darshan_log_read(fd, &header, sizeof(header));
if(ret != sizeof(header))
@@ -853,9 +878,6 @@ static int darshan_log_getheader(darshan_fd fd)
return(-1);
}
- /* save the version string */
- strncpy(fd->version, header.version_string, 8);
-
if(header.magic_nr == DARSHAN_MAGIC_NR)
{
/* no byte swapping needed, this file is in host format already */
=====================================
darshan-util/darshan-mpiio-logutils.c
=====================================
--- a/darshan-util/darshan-mpiio-logutils.c
+++ b/darshan-util/darshan-mpiio-logutils.c
@@ -116,7 +116,7 @@ static void darshan_log_print_mpiio_file(void *file_rec, char *file_name,
static void darshan_log_print_mpiio_description()
{
- printf("\n# desription of MPIIO counters:\n");
+ printf("\n# description of MPIIO counters:\n");
printf("# MPIIO_INDEP_*: MPI independent operation counts.\n");
printf("# MPIIO_COLL_*: MPI collective operation counts.\n");
printf("# MPIIO_SPLIT_*: MPI split collective operation counts.\n");
=====================================
darshan-util/darshan-null-logutils.c
=====================================
--- a/darshan-util/darshan-null-logutils.c
+++ b/darshan-util/darshan-null-logutils.c
@@ -139,7 +139,7 @@ static void darshan_log_print_null_record(void *file_rec, char *file_name,
/* print out a description of the NULL module record fields */
static void darshan_log_print_null_description()
{
- printf("\n# desription of NULL counters:\n");
+ printf("\n# description of NULL counters:\n");
printf("# NULL_BARS: number of 'bar' function calls.\n");
printf("# NULL_BAR_DAT: value set by last call to function 'bar'.\n");
printf("# NULL_F_BAR_TIMESTAMP: timestamp of the first call to function 'bar'.\n");
=====================================
darshan-util/darshan-pnetcdf-logutils.c
=====================================
--- a/darshan-util/darshan-pnetcdf-logutils.c
+++ b/darshan-util/darshan-pnetcdf-logutils.c
@@ -116,7 +116,7 @@ static void darshan_log_print_pnetcdf_file(void *file_rec, char *file_name,
static void darshan_log_print_pnetcdf_description()
{
- printf("\n# desription of PNETCDF counters:\n");
+ printf("\n# description of PNETCDF counters:\n");
printf("# PNETCDF_INDEP_OPENS: PNETCDF independent file open operation counts.\n");
printf("# PNETCDF_COLL_OPENS: PNETCDF collective file open operation counts.\n");
printf("# PNETCDF_F_OPEN_TIMESTAMP: timestamp of first PNETCDF file open.\n");
=====================================
darshan-util/darshan-posix-logutils.c
=====================================
--- a/darshan-util/darshan-posix-logutils.c
+++ b/darshan-util/darshan-posix-logutils.c
@@ -116,7 +116,7 @@ static void darshan_log_print_posix_file(void *file_rec, char *file_name,
static void darshan_log_print_posix_description()
{
- printf("\n# desription of POSIX counters:\n");
+ printf("\n# description of POSIX counters:\n");
printf("# POSIX_*: posix operation counts.\n");
printf("# READS,WRITES,OPENS,SEEKS,STATS, and MMAPS are types of operations.\n");
printf("# POSIX_MODE: mode that file was opened in.\n");
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/31079257caf824b5a78ac9daf4ba22d7d7ce6502...72937c9a125bcbb5e5c71f17e1fffb5e2f0d8b2b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160104/61f3e662/attachment-0001.html>
More information about the Darshan-commits
mailing list