aboutsummaryrefslogtreecommitdiff
path: root/src/WriteIsosurface.c
diff options
context:
space:
mode:
authortradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2000-09-15 09:34:54 +0000
committertradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2000-09-15 09:34:54 +0000
commit9eb7524cd3a1c3fea84241ecfba14fcacf4e0863 (patch)
tree2bbfeeca7a1c0f14628244024b12d907b3ab5d8d /src/WriteIsosurface.c
parenta47a6865c37a9a098605069ba3ed4167bce3378b (diff)
New argument list to H5FDset_fapl_stream().
This works with the newest Stream Virtual File driver from HDF5 1.3.29. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@16 4825ed28-b72c-4eae-9704-e50c059e567d
Diffstat (limited to 'src/WriteIsosurface.c')
-rw-r--r--src/WriteIsosurface.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/WriteIsosurface.c b/src/WriteIsosurface.c
index 19c3f51..db0171a 100644
--- a/src/WriteIsosurface.c
+++ b/src/WriteIsosurface.c
@@ -51,10 +51,11 @@ int IOHDF5_WriteIsosurface (cGH *GH,
int nVertices,
CCTK_REAL4 *vertices)
{
- hid_t h5file, fapl;
+ hid_t h5file, plist;
hid_t aspace, dataspace, dataset;
hid_t group0, group1, group2, group3, group4;
hsize_t dim [2];
+ H5FD_stream_fapl_t fapl;
char sliceName [40], *isoVarname;
int isSocketURL;
sliceInfo_t *sliceInfo;
@@ -71,28 +72,40 @@ int IOHDF5_WriteIsosurface (cGH *GH,
CACTUS_IOHDF5_ERROR (hdf5_string = H5Tcopy (H5T_C_S1));
}
- CACTUS_IOHDF5_ERROR (fapl = H5Pcreate (H5P_FILE_ACCESS));
+ CACTUS_IOHDF5_ERROR (plist = H5Pcreate (H5P_FILE_ACCESS));
isSocketURL = strncasecmp (filename, SOCKET_URL_PREFIX, SOCKET_URL_PREFIX_LEN) == 0;
- if (isSocketURL) {
-#ifndef H5FDstream_H
+ if (isSocketURL)
+ {
+#ifndef H5_HAVE_STREAM
CCTK_WARN (1, "The configured HDF5 installation doesn't include the Stream "
"VFD. No HDF5 streaming output available !");
- CACTUS_IOHDF5_ERROR (H5Pclose (fapl));
+ CACTUS_IOHDF5_ERROR (H5Pclose (plist));
return (-1);
#else
- CACTUS_IOHDF5_ERROR (H5Pset_fapl_stream (fapl, 0, -1));
+ /* set VFD to stream and open the file */
+ fapl.increment = 0;
+ fapl.socket = -1;
+ fapl.do_socket_io = 1;
+ fapl.backlog = 5;
+ fapl.broadcast_fn = NULL;
+ fapl.broadcast_arg = NULL;
+
+ CACTUS_IOHDF5_ERROR (H5Pset_fapl_stream (plist, &fapl));
sliceInfo = NULL;
#endif
- } else
+ }
+ else
+ {
sliceInfo = (sliceInfo_t *) GetNamedData (isoFilesList, filename);
+ }
/* create/open the file */
if (! sliceInfo)
CACTUS_IOHDF5_ERROR (h5file = H5Fcreate (filename, H5F_ACC_TRUNC,
- H5P_DEFAULT, fapl));
+ H5P_DEFAULT, plist));
else
- CACTUS_IOHDF5_ERROR (h5file = H5Fopen (filename, H5F_ACC_RDWR, fapl));
+ CACTUS_IOHDF5_ERROR (h5file = H5Fopen (filename, H5F_ACC_RDWR, plist));
if (h5file < 0) {
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
"Could not create/open output file '%s'", filename);