[MOAB-dev] r4836 - MOAB/trunk/src/io

Iulian Grindeanu iulian at mcs.anl.gov
Tue May 17 17:02:57 CDT 2011


It breaks mpi version too, for me

make[5]: Entering directory `/nfs/mcs-homes129/iulian/cub12/MOAB/src/io'
  CXX    ReadHDF5.lo
ReadHDF5.cpp: In member function ‘moab::ErrorCode moab::ReadHDF5::find_sets_containing(hid_t, hid_t, hid_t, hid_t, long int, moab::Range&)’:
ReadHDF5.cpp:2203: error: ‘comm’ was not declared in this scope
ReadHDF5.cpp:2212: error: ‘comm’ was not declared in this scope
make[5]: *** [ReadHDF5.lo] Error 1

Iulian

----- Original Message -----
> This revision seems to break non-MPI builds-- MPI_Abort and comm go
> undeclared.
> ~S
> 
> On May 17, 2011, at 11:26 , kraftche at cae.wisc.edu wrote:
> 
> > Author: kraftche
> > Date: 2011-05-17 11:26:57 -0500 (Tue, 17 May 2011)
> > New Revision: 4836
> >
> > Modified:
> >   MOAB/trunk/src/io/ReadHDF5.cpp
> > Log:
> > add some checks to HDF5 reader
> >
> > Modified: MOAB/trunk/src/io/ReadHDF5.cpp
> > ===================================================================
> > --- MOAB/trunk/src/io/ReadHDF5.cpp 2011-05-17 13:25:17 UTC (rev
> > 4835)
> > +++ MOAB/trunk/src/io/ReadHDF5.cpp 2011-05-17 16:26:57 UTC (rev
> > 4836)
> > @@ -2111,7 +2111,7 @@
> >                                           hid_t contents_handle,
> >                                           hid_t meta_type,
> >                                           hid_t content_type,
> > - long /*contents_len*/,
> > + long contents_len,
> >                                           Range& file_ids )
> > {
> >
> > @@ -2190,6 +2190,27 @@
> >     assert(rank == 0); // if not MPI, then only one proc
> > #endif
> >   }
> > +
> > + // check offsets so that we don't read past end of table or
> > + // walk off end of array.
> > + long prev = -1;
> > + for (long i = 0; i < num_sets; ++i) {
> > + if (offset_buffer[i] < prev) {
> > + std::cerr << "Invalid data in set contents offsets at position "
> > + << i << ": index " << offset_buffer[i]
> > + << " is less than previous index " << prev << std::endl;
> > + std::cerr.flush();
> > + MPI_Abort(comm,1);
> > + }
> > + prev = offset_buffer[i];
> > + }
> > + if (offset_buffer[num_sets-1] >= contents_len) {
> > + std::cerr << "Maximum set content index " <<
> > offset_buffer[num_sets-1]
> > + << " exceeds contents table length of " << contents_len
> > + << std::endl;
> > + std::cerr.flush();
> > + MPI_Abort(comm,1);
> > + }
> >
> >   // set up buffer for reading set contents
> >   long* const content_buffer = (long*)dataBuffer;
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >


More information about the moab-dev mailing list