summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-10-10 20:07:16 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-10-10 20:07:16 (GMT)
commit65d30cc9c36b782c704daeb4b3f75cdbc7bff680 (patch)
tree58c05fd5f6ef6ee6082acc681599d0ed001c7991 /tools/h5dump/h5dump.c
parent176f59f0f4aaadf3c5fe8637b9478a627b43c076 (diff)
downloadhdf5-65d30cc9c36b782c704daeb4b3f75cdbc7bff680.zip
hdf5-65d30cc9c36b782c704daeb4b3f75cdbc7bff680.tar.gz
hdf5-65d30cc9c36b782c704daeb4b3f75cdbc7bff680.tar.bz2
[svn-r12739] Added Direct I/O driver to VFD. It's only supported by SGI Altix (cobalt). There's a configure
option --enable-direct-vfd/--disable-direct-vfd to enable/disable Direct I/O support. The default is enabled. There's a small test in test/vfd.c. Another way to test it is to set environment variable HDF5_DRIVER to "direct" and run "make check" in the test/ directory. There'll be some further improvement in the following checkin including allowing user to provide memory boundary value, file block size, and copying buffer size.
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index fdee5d1..1ec69aa 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -638,7 +638,7 @@ usage(const char *prog)
fprintf(stdout, " -k L, --block=L Size of block in hyperslab\n");
fprintf(stdout, "\n");
fprintf(stdout, " D - is the file driver to use in opening the file. Acceptable values\n");
- fprintf(stdout, " are \"sec2\", \"family\", \"split\", \"multi\", and \"stream\". Without\n");
+ fprintf(stdout, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n");
fprintf(stdout, " the file driver flag, the file will be opened with each driver in\n");
fprintf(stdout, " turn and in the order specified above until one driver succeeds\n");
fprintf(stdout, " in opening the file.\n");
@@ -2691,7 +2691,7 @@ dump_fcpl(hid_t fid)
unsigned stab; /* symbol table entry version # */
unsigned shhdr; /* shared object header version # */
hid_t fdriver; /* file driver */
- char dname[15]; /* buffer to store driver name */
+ char dname[32]; /* buffer to store driver name */
unsigned sym_lk; /* symbol table B-tree leaf 'K' value */
unsigned sym_ik; /* symbol table B-tree internal 'K' value */
unsigned istore_ik; /* indexed storage B-tree internal 'K' value */
@@ -2731,6 +2731,8 @@ dump_fcpl(hid_t fid)
if (H5FD_CORE==fdriver)
HDstrcpy(dname,"H5FD_CORE");
+ else if (H5FD_DIRECT==fdriver)
+ HDstrcpy(dname,"H5FD_DIRECT");
else if (H5FD_FAMILY==fdriver)
HDstrcpy(dname,"H5FD_FAMILY");
else if (H5FD_LOG==fdriver)
@@ -2747,7 +2749,9 @@ dump_fcpl(hid_t fid)
else if (H5FD_STREAM==fdriver)
HDstrcpy(dname,"H5FD_STREAM");
#endif
-
+ else
+ HDstrcpy(dname,"Unknown driver");
+
indentation(indent + COL);
printf("%s %s\n","FILE_DRIVER", dname);
indentation(indent + COL);
@@ -6239,6 +6243,10 @@ h5_fileaccess(void)
if (H5Pset_fapl_log(fapl, NULL, (unsigned)log_flags, 0) < 0)
return -1;
+ } else if (!HDstrcmp(name, "direct")) {
+ /* Substitute Direct I/O driver with sec2 driver temporarily because
+ * some output has sec2 driver as the standard. */
+ if (H5Pset_fapl_sec2(fapl)<0) return -1;
} else {
/* Unknown driver */
return -1;