[MOAB-dev] r5323 - in MOAB/trunk: examples examples/itaps examples/simple src src/io src/parallel test test/h5file tools
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue Jan 17 09:02:19 CST 2012
Author: tautges
Date: 2012-01-17 09:02:18 -0600 (Tue, 17 Jan 2012)
New Revision: 5323
Modified:
MOAB/trunk/examples/SetsNTags.cpp
MOAB/trunk/examples/SurfArea.cpp
MOAB/trunk/examples/itaps/TagIterateC.c
MOAB/trunk/examples/simple/GetEntities.cpp
MOAB/trunk/src/ScdInterface.cpp
MOAB/trunk/src/io/ReadHDF5.cpp
MOAB/trunk/src/parallel/ParallelComm.cpp
MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
MOAB/trunk/test/OBBTest.cpp
MOAB/trunk/test/h5file/h5file_test.cpp
MOAB/trunk/test/scdseq_test.cpp
MOAB/trunk/tools/parse.cpp
Log:
Fixing various compiler warnings, and changing a buffer size to fix parallel reading.
src/ScdInterface.cpp: removing a compiler warning
src/parallel/WriteHDF5Parallel.cpp: removing a compiler warning, and increasing the initial
buffer size for exchanging shared set data to 1024 from 128
src/io/ReadHDF5.cpp: removing an assert, replaced with comment why
tools/parse.cpp: fixing compiler warnings
Passed make check in serial and parallel.
Modified: MOAB/trunk/examples/SetsNTags.cpp
===================================================================
--- MOAB/trunk/examples/SetsNTags.cpp 2012-01-16 20:04:33 UTC (rev 5322)
+++ MOAB/trunk/examples/SetsNTags.cpp 2012-01-17 15:02:18 UTC (rev 5323)
@@ -25,15 +25,18 @@
rval = mb->load_file(argv[argc-1], 0, par_opt);
else
rval = mb->load_file(argv[argc-1]);
+ if (moab::MB_SUCCESS != rval) return 1;
// loop over set types
for (int i = 0; i < 3; i++) {
rval = mb->tag_get_handle(tag_nms[i], 1, moab::MB_TYPE_INTEGER, mtag);
+ if (moab::MB_SUCCESS != rval) return 1;
// get all the sets of that type in the mesh
sets.clear();
rval = mb->get_entities_by_type_and_tag(0, moab::MBENTITYSET, &mtag,
NULL, 1, sets);
+ if (moab::MB_SUCCESS != rval) return 1;
// iterate over each set, getting entities
moab::Range::iterator set_it;
@@ -43,9 +46,11 @@
// get the id for this set
int set_id;
rval = mb->tag_get_data(mtag, &this_set, 1, &set_id);
+ if (moab::MB_SUCCESS != rval) return 1;
// get the entities in the set, recursively
rval = mb->get_entities_by_handle(this_set, set_ents, true);
+ if (moab::MB_SUCCESS != rval) return 1;
std::cout << tag_nms[i] << " " << set_id << " has "
<< set_ents.size() << " entities:" << std::endl;
@@ -57,9 +62,11 @@
// do the same for all sets
sets.clear();
rval = mb->get_entities_by_type(0, moab::MBENTITYSET, sets);
+ if (moab::MB_SUCCESS != rval) return 1;
// print the sets
rval = mb->list_entities(sets);
+ if (moab::MB_SUCCESS != rval) return 1;
delete mb;
}
Modified: MOAB/trunk/examples/SurfArea.cpp
===================================================================
--- MOAB/trunk/examples/SurfArea.cpp 2012-01-16 20:04:33 UTC (rev 5322)
More information about the moab-dev
mailing list