summaryrefslogtreecommitdiffstats
path: root/configure.in
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 /configure.in
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 'configure.in')
-rw-r--r--configure.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f14cf56..b141e2c 100644
--- a/configure.in
+++ b/configure.in
@@ -2572,6 +2572,45 @@ if test "$STREAM_VFD" = "yes"; then
fi
dnl ----------------------------------------------------------------------
+dnl Check if Direct I/O driver is wanted by --enable-direct-vfd
+dnl
+
+AC_MSG_CHECKING([for Direct Virtual File Driver support])
+
+AC_ARG_ENABLE([direct-vfd],
+ [AC_HELP_STRING([--enable-direct-vfd],
+ [Build the Direct I/O Virtual File Driver
+ [default=yes]])],
+ [DIRECT_VFD=$enableval], [DIRECT_VFD=yes])
+
+if test "$DIRECT_VFD" = "yes"; then
+ AC_CACHE_VAL([hdf5_direct_io],
+ [AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ int main(void)
+ {
+ int fid;
+ if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
+ exit(1);
+ close(fid);
+ remove("tst_file");
+ exit (0);
+ }], [hdf5_direct_io=yes], [hdf5_direct_io=no],)])
+
+ if test ${hdf5_direct_io} = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_DIRECT], [1],
+ [Define if the direct I/O virtual file driver should be compiled])
+ else
+ AC_MSG_RESULT([no])
+ fi
+else
+ AC_MSG_RESULT([suppressed])
+fi
+
+dnl ----------------------------------------------------------------------
dnl Decide whether the presence of user's exception handling functions is
dnl checked and data conversion exceptions are returned. This is mainly
dnl for the speed optimization of hard conversions. Soft conversions can