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.
parent 68b06d4a
......@@ -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
......
......@@ -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
......
......@@ -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
......
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