summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpiposix.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>2002-08-09 14:55:36 (GMT)
committerRobb Matzke <matzke@llnl.gov>2002-08-09 14:55:36 (GMT)
commit20f5e2cc1b20ff43bcc38de67b2c30d87cc1f005 (patch)
tree91070764ad6ca7b675c7ba9bded3c3ce5887f2ca /src/H5FDmpiposix.c
parentf72170ddf7e42802ca4572d72bba8a8fc39b2307 (diff)
downloadhdf5-20f5e2cc1b20ff43bcc38de67b2c30d87cc1f005.zip
hdf5-20f5e2cc1b20ff43bcc38de67b2c30d87cc1f005.tar.gz
hdf5-20f5e2cc1b20ff43bcc38de67b2c30d87cc1f005.tar.bz2
[svn-r5861] ./hdf5-devel/src/H5FDmpiposix.c
Purpose: Merged from 1.4 branch Description: API tracing improvements Platforms tested: Linux (--disable-hsizet didn't work before my changes and still doesn't work, but --enable-hsizet is fine). Note: This checkin includes temporary code in H5FDmpiposix.c to turn off GPFS byte range token prefetches on ASCI/Blue. Once the HDF5 API supports the necessary prerequisite functionality this temporary code can be migraged up above HDF5.
Diffstat (limited to 'src/H5FDmpiposix.c')
-rw-r--r--src/H5FDmpiposix.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 117fea7..e7c5284 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -41,6 +41,10 @@
#include "H5MMprivate.h" /*memory allocation */
#include "H5Pprivate.h" /*property lists */
+#ifdef USE_GPFS_HINTS
+# include <gpfs_fcntl.h>
+#endif
+
/*
* The driver identification number, initialized at runtime if H5_HAVE_PARALLEL
* is defined. This allows applications to still have the H5FD_MPIPOSIX
@@ -604,6 +608,37 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
if (MPI_SUCCESS != (mpi_code= MPI_Bcast(&sb, sizeof(h5_stat_t), MPI_BYTE, 0, fa->comm)))
HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code);
+#ifdef USE_GPFS_HINTS
+ /* Prevent GPFS from prefetching byte range (BR) tokens */
+ {
+ struct {
+ gpfsFcntlHeader_t hdr;
+ gpfsFreeRange_t fr;
+ gpfsMultipleAccessRange_t mar;
+ } hint;
+ memset(&hint, 0, sizeof hint);
+ hint.hdr.totalLength = sizeof hint;
+ hint.hdr.fcntlVersion = GPFS_FCNTL_CURRENT_VERSION;
+ hint.fr.structLen = sizeof hint.fr;
+ hint.fr.structType = GPFS_FREE_RANGE;
+ hint.fr.start = 0;
+ hint.fr.length = 0;
+ hint.mar.structLen = sizeof hint.mar;
+ hint.mar.structType = GPFS_MULTIPLE_ACCESS_RANGE;
+ hint.mar.accRangeCnt = 1;
+ hint.mar.accRangeArray[0].blockNumber = 1 + mpi_rank;
+ hint.mar.accRangeArray[0].start = 0;
+ hint.mar.accRangeArray[0].length = sb.st_blksize;
+ hint.mar.accRangeArray[0].isWrite = true;
+
+ if (gpfs_fcntl(f->fd, &hint)<0)
+ HGOTO_ERROR(H5E_FILE, H5E_FCNTL, NULL, "failed to send hints to GPFS");
+
+ if (0==mpi_rank)
+ fprintf(stderr, "HDF5: using GPFS hint mechanism...\n");
+ }
+#endif
+
/* Build the file struct and initialize it */
if (NULL==(file=H5MM_calloc(sizeof(H5FD_mpiposix_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");