[MOAB-dev] r5144 - MOAB/trunk/src/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed Aug 31 15:58:56 CDT 2011
Author: kraftche
Date: 2011-08-31 15:58:56 -0500 (Wed, 31 Aug 2011)
New Revision: 5144
Modified:
MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
MOAB/trunk/src/parallel/WriteHDF5Parallel.hpp
Log:
add more debug output to paralell hdf5 writer
Modified: MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp 2011-08-30 23:07:30 UTC (rev 5143)
+++ MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp 2011-08-31 20:58:56 UTC (rev 5144)
@@ -1362,6 +1362,66 @@
return MB_SUCCESS;
}
+const unsigned SSVB = 3;
+
+void WriteHDF5Parallel::print_set_sharing_data( const Range& range, const char* label, Tag idt )
+{
+ dbgOut.printf(SSVB,"set\tid\towner\t%-*s\tfid\tshared\n",(int)(sizeof(EntityHandle)*2),"handle");
+ for (Range::iterator it = range.begin(); it != range.end(); ++it) {
+ int id;
+ iFace->tag_get_data( idt, &*it, 1, &id );
+ EntityHandle handle = 0;
+ unsigned owner = 0;
+ id_t file_id = 0;
+ myPcomm->get_entityset_owner( *it, owner, &handle );
+ if (!idMap.find( *it, file_id ))
+ file_id = 0;
+ dbgOut.printf(SSVB,"%s\t%d\t%u\t%lx\t%lu\t", label, id, owner, (unsigned long)handle, (unsigned long)file_id);
+ std::vector<unsigned> procs;
+ myPcomm->get_entityset_procs( *it, procs );
+ if (procs.empty())
+ dbgOut.print(SSVB,"<none>\n");
+ else {
+ for (unsigned i = 0; i < procs.size()-1; ++i)
+ dbgOut.printf(SSVB,"%u,", procs[i]);
+ dbgOut.printf(SSVB,"%u\n",procs.back());
+ }
+ }
+}
+
+
+void WriteHDF5Parallel::print_shared_sets()
+{
+ const char* tag_names[][2] = { { MATERIAL_SET_TAG_NAME, "block" },
+ { DIRICHLET_SET_TAG_NAME, "nodeset" },
+ { NEUMANN_SET_TAG_NAME, "sideset" },
+ { 0, 0 } };
+
+ for (int i = 0; tag_names[i][0]; ++i) {
+ Tag tag;
+ if (MB_SUCCESS != iFace->tag_get_handle( tag_names[i][0], 1, MB_TYPE_INTEGER, tag ))
+ continue;
+
+ Range tagged;
+ iFace->get_entities_by_type_and_tag( 0, MBENTITYSET, &tag, 0, 1, tagged );
+ print_set_sharing_data( tagged, tag_names[i][1], tag );
More information about the moab-dev
mailing list