Commit 56a61bac authored by Shane Snyder's avatar Shane Snyder

make DXT module request 0 memory from darshan-core

parent 5db2a039
...@@ -663,6 +663,7 @@ infodir ...@@ -663,6 +663,7 @@ infodir
docdir docdir
oldincludedir oldincludedir
includedir includedir
runstatedir
localstatedir localstatedir
sharedstatedir sharedstatedir
sysconfdir sysconfdir
...@@ -746,6 +747,7 @@ datadir='${datarootdir}' ...@@ -746,6 +747,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc' sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com' sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
...@@ -998,6 +1000,15 @@ do ...@@ -998,6 +1000,15 @@ do
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; 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) -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;; ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
...@@ -1135,7 +1146,7 @@ fi ...@@ -1135,7 +1146,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \ datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir libdir localedir mandir runstatedir
do do
eval ac_val=\$$ac_var eval ac_val=\$$ac_var
# Remove trailing slashes. # Remove trailing slashes.
...@@ -1288,6 +1299,7 @@ Fine tuning of the installation directories: ...@@ -1288,6 +1299,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var] --localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib] --libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include] --oldincludedir=DIR C header files for non-gcc [/usr/include]
......
...@@ -38,12 +38,11 @@ ...@@ -38,12 +38,11 @@
#define DARSHAN_DEF_MMAP_LOG_PATH "/tmp" #define DARSHAN_DEF_MMAP_LOG_PATH "/tmp"
#endif #endif
/* DXT */
/* Maximum amount of memory per instrumentation module in MiB */ /* Maximum amount of memory per instrumentation module in MiB */
#ifdef __DARSHAN_MOD_MEM_MAX #ifdef __DARSHAN_MOD_MEM_MAX
#define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024) #define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024)
#else #else
#define DARSHAN_MOD_MEM_MAX (4 * 1024 * 1024) /* 4 MiB default */ #define DARSHAN_MOD_MEM_MAX (2 * 1024 * 1024) /* 2 MiB default */
#endif #endif
/* default name record buf can store 2048 records of size 100 bytes */ /* default name record buf can store 2048 records of size 100 bytes */
......
...@@ -280,21 +280,22 @@ void dxt_mpiio_read(MPI_File fh, int64_t length, ...@@ -280,21 +280,22 @@ void dxt_mpiio_read(MPI_File fh, int64_t length,
/* initialize internal DXT module data structures and register with darshan-core */ /* initialize internal DXT module data structures and register with darshan-core */
void dxt_posix_runtime_initialize() void dxt_posix_runtime_initialize()
{ {
int psx_buf_size; /* DXT modules request 0 memory -- buffers will be managed internally by DXT
* and passed back to darshan-core at shutdown time to allow DXT more control
/* try and store a default number of records for this module */ * over realloc'ing module memory as needed.
psx_buf_size = DARSHAN_DEF_MOD_REC_COUNT * sizeof(struct dxt_file_record); */
int dxt_psx_buf_size = 0;
/* register the DXT module with darshan core */ /* register the DXT module with darshan core */
darshan_core_register_module( darshan_core_register_module(
DXT_POSIX_MOD, DXT_POSIX_MOD,
&dxt_posix_shutdown, &dxt_posix_shutdown,
&psx_buf_size, &dxt_psx_buf_size,
&posix_my_rank, &posix_my_rank,
&darshan_mem_alignment); &darshan_mem_alignment);
/* return if darshan-core does not provide enough module memory */ /* return if darshan-core allocates an unexpected amount of memory */
if(psx_buf_size < sizeof(struct dxt_file_record)) if(dxt_psx_buf_size != 0)
{ {
darshan_core_unregister_module(DXT_POSIX_MOD); darshan_core_unregister_module(DXT_POSIX_MOD);
return; return;
...@@ -313,21 +314,22 @@ void dxt_posix_runtime_initialize() ...@@ -313,21 +314,22 @@ void dxt_posix_runtime_initialize()
void dxt_mpiio_runtime_initialize() void dxt_mpiio_runtime_initialize()
{ {
int psx_buf_size; /* DXT modules request 0 memory -- buffers will be managed internally by DXT
* and passed back to darshan-core at shutdown time to allow DXT more control
/* try and store a default number of records for this module */ * over realloc'ing module memory as needed.
psx_buf_size = DARSHAN_DEF_MOD_REC_COUNT * sizeof(struct dxt_file_record); */
int dxt_mpiio_buf_size = 0;
/* register the DXT module with darshan core */ /* register the DXT module with darshan core */
darshan_core_register_module( darshan_core_register_module(
DXT_MPIIO_MOD, DXT_MPIIO_MOD,
&dxt_mpiio_shutdown, &dxt_mpiio_shutdown,
&psx_buf_size, &dxt_mpiio_buf_size,
&mpiio_my_rank, &mpiio_my_rank,
&darshan_mem_alignment); &darshan_mem_alignment);
/* return if darshan-core does not provide enough module memory */ /* return if darshan-core allocates an unexpected amount of memory */
if(psx_buf_size < sizeof(struct dxt_file_record)) if(dxt_mpiio_buf_size != 0)
{ {
darshan_core_unregister_module(DXT_MPIIO_MOD); darshan_core_unregister_module(DXT_MPIIO_MOD);
return; return;
......
...@@ -661,6 +661,7 @@ infodir ...@@ -661,6 +661,7 @@ infodir
docdir docdir
oldincludedir oldincludedir
includedir includedir
runstatedir
localstatedir localstatedir
sharedstatedir sharedstatedir
sysconfdir sysconfdir
...@@ -734,6 +735,7 @@ datadir='${datarootdir}' ...@@ -734,6 +735,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc' sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com' sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
...@@ -986,6 +988,15 @@ do ...@@ -986,6 +988,15 @@ do
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; 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) -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;; ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
...@@ -1123,7 +1134,7 @@ fi ...@@ -1123,7 +1134,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \ datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir libdir localedir mandir runstatedir
do do
eval ac_val=\$$ac_var eval ac_val=\$$ac_var
# Remove trailing slashes. # Remove trailing slashes.
...@@ -1276,6 +1287,7 @@ Fine tuning of the installation directories: ...@@ -1276,6 +1287,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var] --localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib] --libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include] --oldincludedir=DIR C header files for non-gcc [/usr/include]
......
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