[MOAB-dev] r3982 - in MOAB/trunk: src src/io src/moab src/parallel test/h5file test/io test/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Sat May 29 18:49:12 CDT 2010
Author: kraftche
Date: 2010-05-29 18:49:11 -0500 (Sat, 29 May 2010)
New Revision: 3982
Modified:
MOAB/trunk/src/Core.cpp
MOAB/trunk/src/io/ReadABAQUS.cpp
MOAB/trunk/src/io/ReadABAQUS.hpp
MOAB/trunk/src/io/ReadCCMIO.cpp
MOAB/trunk/src/io/ReadCCMIO.hpp
MOAB/trunk/src/io/ReadCGM.cpp
MOAB/trunk/src/io/ReadCGM.hpp
MOAB/trunk/src/io/ReadGmsh.cpp
MOAB/trunk/src/io/ReadGmsh.hpp
MOAB/trunk/src/io/ReadHDF5.cpp
MOAB/trunk/src/io/ReadHDF5.hpp
MOAB/trunk/src/io/ReadIDEAS.cpp
MOAB/trunk/src/io/ReadIDEAS.hpp
MOAB/trunk/src/io/ReadMCNP5.cpp
MOAB/trunk/src/io/ReadMCNP5.hpp
MOAB/trunk/src/io/ReadNASTRAN.cpp
MOAB/trunk/src/io/ReadNASTRAN.hpp
MOAB/trunk/src/io/ReadNCDF.cpp
MOAB/trunk/src/io/ReadNCDF.hpp
MOAB/trunk/src/io/ReadSTL.cpp
MOAB/trunk/src/io/ReadSTL.hpp
MOAB/trunk/src/io/ReadSmf.cpp
MOAB/trunk/src/io/ReadSmf.hpp
MOAB/trunk/src/io/ReadSms.cpp
MOAB/trunk/src/io/ReadSms.hpp
MOAB/trunk/src/io/ReadTetGen.cpp
MOAB/trunk/src/io/ReadTetGen.hpp
MOAB/trunk/src/io/ReadVtk.cpp
MOAB/trunk/src/io/ReadVtk.hpp
MOAB/trunk/src/io/Tqdcfr.cpp
MOAB/trunk/src/io/Tqdcfr.hpp
MOAB/trunk/src/moab/Core.hpp
MOAB/trunk/src/moab/ReaderIface.hpp
MOAB/trunk/src/parallel/ReadParallel.cpp
MOAB/trunk/src/parallel/ReadParallel.hpp
MOAB/trunk/test/h5file/h5partial.cpp
MOAB/trunk/test/io/cub_file_test.cc
MOAB/trunk/test/io/exodus_test.cc
MOAB/trunk/test/io/gmsh_test.cc
MOAB/trunk/test/io/ideas_test.cc
MOAB/trunk/test/io/nastran_test.cc
MOAB/trunk/test/io/smf_test.cc
MOAB/trunk/test/io/stl_test.cc
MOAB/trunk/test/parallel/mbparallelcomm_test.cpp
MOAB/trunk/test/parallel/pcomm_serial.cpp
Log:
o Change the way the subset specification is passed to readers for
partial/parallel read.
o Change some of the reader tests to go through moab::Interface
o fix bug where ReadHDF5 did not compile if MOAB was configured with
MPI support but the HDF5 library was not.
The reader test changes will hopefully avoid the need to update these
tests very time the internal reader interface changes.
After trying to document the argument list I had previously defined for
this, I came to the conclusion that it was confusing and a little bit
non-sensical for parallel reads. The num_parts and part_number arguments,
if speicified, should apply to the whole list of tagged sets, rather than
being associated with a particular tag. Rather than document a broken
API, I decided to fix it.
Rather than make the num_parts and part_number arguments be two more
arguments to Reader::load_file, wrap all the arguments related to
partial reads in a struct and pass that as a poitner to Reader::load_file.
This is a little more complicated, but makes sense to me for this
particular case because the vast majority of readers don't support
partial/parallel reads and therefore need never look at the contents
of the struct.
Most of the modified reader sources were just function signature changes.
The only functional change was in ReadHDF5, which is the only reader that
did anything with two arguments in question.
Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp 2010-05-28 22:43:55 UTC (rev 3981)
+++ MOAB/trunk/src/Core.cpp 2010-05-29 23:49:11 UTC (rev 3982)
@@ -370,7 +370,8 @@
{
FileOptions opts(options);
ErrorCode rval;
- ReaderIface::IDTag t = { set_tag_name, set_tag_vals, num_set_tag_vals, 0, 0 };
+ ReaderIface::IDTag t = { set_tag_name, set_tag_vals, num_set_tag_vals };
+ ReaderIface::SubsetList sl = { &t, 1, 0, 0 };
// if reading in parallel, call a different reader
std::string parallel_opt;
@@ -390,7 +391,7 @@
else if (rval != MB_ENTITY_NOT_FOUND)
return rval;
if (set_tag_name && num_set_tag_vals)
- rval = ReadParallel(this,pcomm).load_file( file_name, file_set, opts, &t, 1 );
+ rval = ReadParallel(this,pcomm).load_file( file_name, file_set, opts, &sl );
else
rval = ReadParallel(this,pcomm).load_file( file_name, file_set, opts );
#else
@@ -401,7 +402,7 @@
}
else {
if (set_tag_name && num_set_tag_vals)
- rval = serial_load_file( file_name, file_set, opts, &t, 1 );
+ rval = serial_load_file( file_name, file_set, opts, &sl );
else
rval = serial_load_file( file_name, file_set, opts );
}
@@ -440,11 +441,10 @@
}
ErrorCode Core::serial_load_file( const char* file_name,
- const EntityHandle* file_set,
- const FileOptions& opts,
- const ReaderIface::IDTag* subsets,
- int num_sets,
- const Tag* id_tag )
+ const EntityHandle* file_set,
+ const FileOptions& opts,
+ const ReaderIface::SubsetList* subsets,
+ const Tag* id_tag )
{
int status;
#if defined(WIN32) || defined(WIN64) || defined(MSC_VER)
@@ -466,9 +466,6 @@
mError->set_last_error( "%s: Cannot read directory/folder.", file_name );
return MB_FILE_DOES_NOT_EXIST;
More information about the moab-dev
mailing list