[MOAB-dev] r3073 - MOAB/trunk/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed Jul 29 17:38:06 CDT 2009
Author: kraftche
Date: 2009-07-29 17:38:06 -0500 (Wed, 29 Jul 2009)
New Revision: 3073
Modified:
MOAB/trunk/parallel/WriteHDF5Parallel.cpp
Log:
clean up diagnostic output a bit
Modified: MOAB/trunk/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/parallel/WriteHDF5Parallel.cpp 2009-07-29 22:14:12 UTC (rev 3072)
+++ MOAB/trunk/parallel/WriteHDF5Parallel.cpp 2009-07-29 22:38:06 UTC (rev 3073)
@@ -1346,29 +1346,36 @@
std::map<int,long>::iterator p = val_id_map.find( data.local_values[i] );
assert( p != val_id_map.end() );
long id = p->second;
+
if (idMap.end() == idMap.insert( *riter, id, 1 )) {
- std::ostringstream s;
- s << "[" << myPcomm->rank() << "] ";
- std::string pfx1 = s.str();
- s << " ";
- std::string pfx2 = s.str();
-
- std::cerr << pfx1 << "Duplicate shared set handle or internal accounting error" << std::endl;
- std::cerr << pfx1 << "RemoteSetData: " << std::endl;
- print_remote_set_data( std::cerr, iFace, data, pfx2.c_str() );
+ for (unsigned x = 0; x < myPcomm->size(); ++x) {
+ MPI_Barrier( myPcomm->proc_config().proc_comm() );
+ if (x != myPcomm->rank()) continue;
+
+ std::ostringstream s;
+ s << "[" << myPcomm->rank() << "] ";
+ std::string pfx1 = s.str();
+ s << " ";
+ std::string pfx2 = s.str();
+
+ std::cerr << pfx1 << "Duplicate shared set handle or internal accounting error" << std::endl;
+ std::cerr << pfx1 << "RemoteSetData: " << std::endl;
+ print_remote_set_data( std::cerr, iFace, data, pfx2.c_str() );
+
+ std::cerr << pfx1 << "val_id_map: " << std::endl;
+ for (p = val_id_map.begin(); p != val_id_map.end(); ++p)
+ std::cerr << pfx2 << p->first << "->" << p->second << std::endl;
+
+ std::cerr << pfx1 << "idMap: " << std::endl;
+ print_id_map( std::cerr, pfx2.c_str() );
+
+ std::cerr << pfx1 << "Failed at: (" << i << ") " << data.local_values[i]
+ << "->" << id << " for "
+ << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*riter))
+ << " " << ID_FROM_HANDLE(*riter) << std::endl;
+ std::cerr.flush();
+ }
- std::cerr << pfx1 << "val_id_map: " << std::endl;
- for (p = val_id_map.begin(); p != val_id_map.end(); ++p)
- std::cerr << pfx2 << p->first << "->" << p->second << std::endl;
-
- std::cerr << "idMap: " << std::endl;
- print_id_map( std::cerr, pfx2.c_str() );
-
- std::cerr << pfx1 << "Failed at: (" << i << ") " << data.local_values[i]
- << "->" << id << " for "
- << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*riter))
- << " " << ID_FROM_HANDLE(*riter) << std::endl;
-
assert(false);
return MB_FAILURE;
}
More information about the moab-dev
mailing list