15 #include <H5Dpublic.h>
16 #include <H5Tpublic.h>
17 #include <H5Ppublic.h>
18 #include <H5Spublic.h>
19 #ifdef MOAB_HAVE_HDF5_PARALLEL
24 #define HDF5_16API ( H5_VERS_MAJOR < 2 && H5_VERS_MINOR < 8 )
40 #ifdef MOAB_HAVE_LIBMPE
43 std::pair< int, int > result;
52 return std::pair< int, int >();
61 : closeDataSet( false ), dataSet( -1 ), dataSpace( -1 ), dataType( -1 ), fileType( -1 ), ioProp( H5P_DEFAULT ),
62 dataSpaceRank( 0 ), rowsInTable( 0 ), doConversion( false ), nativeParallel( parallel ), readCount( 0 ),
63 bufferSize( 0 ), mpiComm( communicator ), mpeDesc( debug_desc )
72 #ifndef MOAB_HAVE_HDF5_PARALLEL
79 ioProp = H5Pcreate( H5P_DATASET_XFER );
80 H5Pset_dxpl_mpio(
ioProp, H5FD_MPIO_COLLECTIVE );
86 hid_t data_set_handle,
88 const Comm* communicator,
90 : closeDataSet( close_data_set ), dataSet( data_set_handle ), dataSpace( -1 ), dataType( -1 ), fileType( -1 ),
91 ioProp( H5P_DEFAULT ), dataSpaceRank( 0 ), rowsInTable( 0 ), doConversion( false ), nativeParallel( parallel ),
92 readCount( 0 ), bufferSize( 0 ), mpiComm( communicator ), mpeDesc( debug_desc )
101 init( data_set_handle, close_data_set );
103 #ifndef MOAB_HAVE_HDF5_PARALLEL
110 ioProp = H5Pcreate( H5P_DATASET_XFER );
111 H5Pset_dxpl_mpio(
ioProp, H5FD_MPIO_COLLECTIVE );
121 fileType = H5Dget_type( data_set_handle );
158 while( iter !=
rangeEnd && slabs_remaining )
185 #ifdef MOAB_HAVE_HDF5_PARALLEL
197 MPI_Allreduce( &send, &recv, 1, MPI_UNSIGNED_LONG, MPI_MAX, *
mpiComm );
205 if( equal < 0 )
throw Exception( __LINE__ );
217 size_t mem_size, file_size;
219 file_size = H5Tget_size(
fileType );
251 H5S_seloper_t sop = H5S_SELECT_SET;
265 if( err < 0 )
throw Exception( __LINE__ );
274 if( mem_id < 0 )
throw Exception( __LINE__ );
279 if( err < 0 )
throw Exception( __LINE__ );
286 if( err < 0 )
throw Exception( __LINE__ );
301 if( err < 0 )
throw Exception( __LINE__ );
305 hid_t mem_id = H5Screate_simple( 1, &one, NULL );
306 if( mem_id < 0 )
throw Exception( __LINE__ );
307 err = H5Sselect_none( mem_id );
321 if( err < 0 )
throw Exception( __LINE__ );