Commit 038db721 authored by Kevin Harms's avatar Kevin Harms

Initial changes for adding configure item for the JobId environment variable.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@265 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 357cdb6d
......@@ -131,3 +131,7 @@ install:: all
clean::
rm -f *.o *.a lib/*.o lib/*.a darshan-parser darshan-diff darshan-analyzer darshan-log-params
distclean:: clean
rm -f darshan-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl aclocal.m4 autom4te.cache/* config.status config.log Makefile
rmdir autom4te.cache
This diff is collapsed.
......@@ -65,6 +65,16 @@ AC_ARG_WITH(log-path,
fi
)
AC_ARG_WITH(jobid-env,
[ --with-jobid-env=<name> Name of environment variable that stores the jobid ],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-jobid-env must be given a name)
else
AC_DEFINE_UNQUOTED(CP_JOBID, "${withval}", Name of the environment variable that stores the jobid)
CP_JOBID="${withval}"
GOT_JOBID=1
fi
)
saveCC="$CC"
CC="$MPICC"
......@@ -78,6 +88,9 @@ fi
if test x$GOT_LOG_PATH != x1; then
AC_MSG_ERROR(must provide --with-log-path=<path> argument to configure.)
fi
if test x$GOT_JOBID != x1; then
AC_MSG_ERROR(must provide --with-jobid-env=<name> argument to configure.)
fi
AC_MSG_CHECKING(whether the mpicc compiler works)
AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)],
......
/* darshan-config.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Name of the environment variable that stores the jobid */
#undef CP_JOBID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......@@ -48,9 +48,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......@@ -60,17 +57,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Location to store log files at run time */
#undef __CP_LOG_PATH
......
......@@ -225,6 +225,7 @@ struct darshan_job
int64_t start_time;
int64_t end_time;
int64_t nprocs;
int64_t jobid;
};
#if SIZEOF_LONG_INT == 4
......
......@@ -1032,6 +1032,7 @@ void darshan_initialize(int argc, char** argv, int nprocs, int rank)
darshan_global_job->log_job.uid = getuid();
darshan_global_job->log_job.start_time = time(NULL);
darshan_global_job->log_job.nprocs = nprocs;
darshan_global_job->log_job.jobid = atoi(getenv(CP_JOBID));
my_rank = rank;
/* record exe and arguments */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment