[MOAB-dev] r4463 - MOAB/trunk/src/io/mhdf/src

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Jan 21 14:16:04 CST 2011


Author: kraftche
Date: 2011-01-21 14:16:03 -0600 (Fri, 21 Jan 2011)
New Revision: 4463

Modified:
   MOAB/trunk/src/io/mhdf/src/file.c
Log:
Some versions of HDF5 library (e.g. 1.8.4p2) segfault if asked to open some
  random non-hdf5 binary file.  The normal work-around for this is to
  call H5Fis_hdf5 to check the file type first.  However, that call has
  no option to open the file in parallel, causing hacks like prefixing
  the filename with bglockless: in Blue Gene machines to fail the test.
  As an incomplete compromise, only call H5Fis_hdf5 if compiled with
  an HDF5 library w/out support for MPI-IO.



Modified: MOAB/trunk/src/io/mhdf/src/file.c
===================================================================
--- MOAB/trunk/src/io/mhdf/src/file.c	2011-01-21 20:13:06 UTC (rev 4462)
+++ MOAB/trunk/src/io/mhdf/src/file.c	2011-01-21 20:16:03 UTC (rev 4463)
@@ -290,12 +290,13 @@
   
     /* Check if file is HDF5 */
   /* Don't do this because it can't handle MPI-IO driver code that
-     passes options via prefixes on the file name.
+     passes options via prefixes on the file name. */
+#ifndef HDF5_PARALLEL
   if (H5Fis_hdf5( filename ) <= 0) {
     mhdf_setFail( status, "%s: File is not HDF5", filename );
     return NULL;
   }
-  */
+#endif
   
     /* Create struct to hold working data */
   file_ptr = mhdf_alloc_FileHandle( 0, status );

































More information about the moab-dev mailing list