[Darshan-commits] [Git][darshan/darshan][master] 2 commits: Make "--with-mem-align" optional, and default to 8

Philip Carns xgitlab at cels.anl.gov
Fri Mar 6 10:10:58 CST 2020



Philip Carns pushed to branch master at darshan / darshan


Commits:
b427e72b by Christopher J. Morrone at 2020-03-05T14:14:58-08:00
Make "--with-mem-align" optional, and default to 8

Little guidance is given for what the the memory alignment value means
or how to determine it, so making it optional lowers a barrier to
getting started with darshan.

8 seems to be the common value for "--with-mem-align", so we make
it the default.

- - - - -
f4939002 by Philip Carns at 2020-03-06T10:10:55-06:00
Merge branch 'mem_align' into 'master'

Make "--with-mem-align" optional, and default to 8

See merge request darshan/darshan!38
- - - - -


3 changed files:

- darshan-runtime/configure
- darshan-runtime/configure.in
- darshan-runtime/doc/darshan-runtime.txt


Changes:

=====================================
darshan-runtime/configure
=====================================
@@ -679,7 +679,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -775,7 +774,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1028,15 +1026,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1174,7 +1163,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir runstatedir
+		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1327,7 +1316,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1387,7 +1375,7 @@ Optional Packages:
   --with-zlib=DIR root directory path of zlib installation defaults to
                     /usr/local or /usr if not found in /usr/local
   --without-zlib to disable zlib usage completely
-  --with-mem-align=<num>  Memory alignment in bytes
+  --with-mem-align=<num>  Memory alignment in bytes [default=8]
   --with-log-path-by-env=<env var list>
                           Comma separated list of environment variables to check for
                           log path location before --with-log-path path
@@ -3947,8 +3935,11 @@ cat >>confdefs.h <<_ACEOF
 #define __DARSHAN_MEM_ALIGNMENT ${withval}
 _ACEOF
 
-        GOT_ALIGNMENT=1
     fi
+else
+
+$as_echo "#define __DARSHAN_MEM_ALIGNMENT 8" >>confdefs.h
+
 
 fi
 
@@ -4245,9 +4236,6 @@ done
 
 fi
 
-if test x$GOT_ALIGNMENT != x1; then
-    as_fn_error $? "must provide --with-mem-align=<num> argument to configure." "$LINENO" 5
-fi
 if test x$GOT_LOG_PATH != x1; then
     as_fn_error $? "must provide --with-log-path=<path> _or_ --with-log-path-by-env=<variable list> argument to configure." "$LINENO" 5
 fi


=====================================
darshan-runtime/configure.in
=====================================
@@ -107,13 +107,13 @@ fi]
 ,)
 
 AC_ARG_WITH(mem-align,
-[  --with-mem-align=<num>  Memory alignment in bytes],
-    if test x$withval = xyes; then
+[  --with-mem-align=<num>  Memory alignment in bytes @<:@default=8@:>@],
+    [if test x$withval = xyes; then
         AC_MSG_ERROR(--with-mem-align must be given a number in bytes)
     else
         AC_DEFINE_UNQUOTED(__DARSHAN_MEM_ALIGNMENT, ${withval}, Memory alignment in bytes)
-        GOT_ALIGNMENT=1
-    fi
+    fi],
+    [AC_DEFINE([__DARSHAN_MEM_ALIGNMENT], [8], [Memory alignment in bytes])]
 )
 
 AC_ARG_WITH(log-path-by-env,
@@ -312,9 +312,6 @@ AS_IF([test "x$enable_mdhim" = "xyes"],
       )
 
 dnl sanity check some config parameters
-if test x$GOT_ALIGNMENT != x1; then
-    AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.)
-fi
 if test x$GOT_LOG_PATH != x1; then
     AC_MSG_ERROR(must provide --with-log-path=<path> _or_ --with-log-path-by-env=<variable list> argument to configure.)
 fi


=====================================
darshan-runtime/doc/darshan-runtime.txt
=====================================
@@ -58,7 +58,7 @@ http://www.mcs.anl.gov/darshan[Darshan web site].
 ----
 tar -xvzf darshan-<version-number>.tar.gz
 cd darshan-<version-number>/darshan-runtime
-./configure --with-mem-align=8 --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID CC=mpicc
+./configure --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID CC=mpicc
 make
 make install
 ----
@@ -67,15 +67,15 @@ make install
 ----
 tar -xvzf darshan-<version-number>.tar.gz
 cd darshan-<version-number>/darshan-runtime
-./configure --with-mem-align=8 --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID --without-mpi CC=gcc
+./configure --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID --without-mpi CC=gcc
 make
 make install
 ----
 
 .Explanation of configure arguments:
-* `--with-mem-align=` (mandatory): This value is system-dependent and will be
+* `--with-mem-align=`: This value is system-dependent and will be
 used by Darshan to determine if the buffer for a read or write operation is
-aligned in memory.
+aligned in memory (default is 8).
 * `--with-jobid-env=` (mandatory): this specifies the environment variable that
 Darshan should check to determine the jobid of a job.  Common values are
 `PBS_JOBID` or `COBALT_JOBID`.  If you are not using a scheduler (or your
@@ -465,7 +465,7 @@ and installation path, respectively.
 
 ----
 module swap PrgEnv-pgi PrgEnv-gnu
-./configure --with-mem-align=8 \
+./configure \
  --with-log-path=/shared-file-system/darshan-logs \
  --prefix=/soft/darshan-2.2.3 \
  --with-jobid-env=PBS_JOBID --disable-cuserid CC=cc
@@ -540,7 +540,7 @@ Most Intel MPI installations produce dynamic executables by default.  To
 configure Darshan in this environment you can use the following example:
 
 ----
-./configure --with-mem-align=8 --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID CC=mpicc
+./configure --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID CC=mpicc
 ----
 
 .Rationale



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/91c2d4a6e6f10fea6c40c9f47f7143e2737dfa5f...f4939002fc782f4335554f73cd55001f72ff400e

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/91c2d4a6e6f10fea6c40c9f47f7143e2737dfa5f...f4939002fc782f4335554f73cd55001f72ff400e
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/20200306/546d80f8/attachment-0001.html>


More information about the Darshan-commits mailing list