[MOAB-dev] r3063 - MOAB/trunk/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Jul 28 11:59:29 CDT 2009
Author: kraftche
Date: 2009-07-28 11:59:28 -0500 (Tue, 28 Jul 2009)
New Revision: 3063
Modified:
MOAB/trunk/parallel/ReadParallel.cpp
Log:
don't populate tag with unique IDs unless resolving shared entities
Modified: MOAB/trunk/parallel/ReadParallel.cpp
===================================================================
--- MOAB/trunk/parallel/ReadParallel.cpp 2009-07-27 22:33:01 UTC (rev 3062)
+++ MOAB/trunk/parallel/ReadParallel.cpp 2009-07-28 16:59:28 UTC (rev 3063)
@@ -324,12 +324,18 @@
return MB_NOT_IMPLEMENTED;
}
- use_id_tag = true;
- if (!file_id_tag) {
- tmp_result = mbImpl->tag_create( "", sizeof(int), MB_TAG_DENSE, MB_TYPE_INTEGER, id_tag, 0 );
- if (MB_SUCCESS != tmp_result)
- break;
- file_id_tag = &id_tag;
+ // If we're going to resolve shared entities, then we need
+ // to ask the file reader to populate a tag with unique ids
+ // (typically file ids/indices/whatever.)
+ if (std::find( pa_vec.begin(), pa_vec.end(), PA_RESOLVE_SHARED_ENTS )
+ != pa_vec.end()) {
+ use_id_tag = true;
+ if (!file_id_tag) {
+ tmp_result = mbImpl->tag_create( "", sizeof(int), MB_TAG_DENSE, MB_TYPE_INTEGER, id_tag, 0 );
+ if (MB_SUCCESS != tmp_result)
+ break;
+ file_id_tag = &id_tag;
+ }
}
MBReaderIface::IDTag parts = { partition_tag_name.c_str(),
@@ -467,7 +473,7 @@
if (cputime) act_times[i] = MPI_Wtime();
}
- if (id_tag) {
+ if (use_id_tag) {
MBErrorCode tmp_result = mbImpl->tag_delete( id_tag );
if (MB_SUCCESS != tmp_result && MB_SUCCESS == result)
result = tmp_result;
More information about the moab-dev
mailing list