[MOAB-dev] r3062 - MOAB/trunk/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Mon Jul 27 17:33:01 CDT 2009
Author: kraftche
Date: 2009-07-27 17:33:01 -0500 (Mon, 27 Jul 2009)
New Revision: 3062
Modified:
MOAB/trunk/parallel/parallel_hdf5_test.cc
Log:
don't re-use MBCore instances for multiple reads because it appears that pcomm data is not cleared correctly by delete_mesh()
Modified: MOAB/trunk/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/parallel/parallel_hdf5_test.cc 2009-07-27 21:11:26 UTC (rev 3061)
+++ MOAB/trunk/parallel/parallel_hdf5_test.cc 2009-07-27 22:33:01 UTC (rev 3062)
@@ -831,26 +831,31 @@
CHECK_ERR(rval);
times[0] = MPI_Wtime() - times[0];
times[1] = double(clock() - tmp_t) / CLOCKS_PER_SEC;
+ mb.delete_mesh();
// Time read and delete
- mb.delete_mesh();
+ MBCore moab2;
+ MBInterface& mb2 = moab2;
times[2] = MPI_Wtime();
tmp_t = clock();
const char opt2[] = "PARALLEL=READ_DELETE;PARTITION=PARTITION;PARTITION_BY_RANK";
- rval = mb.load_file( file_name, file_set, opt2 );
+ rval = mb2.load_file( file_name, file_set, opt2 );
CHECK_ERR(rval);
times[2] = MPI_Wtime() - times[2];
times[3] = double(clock() - tmp_t) / CLOCKS_PER_SEC;
+ mb2.delete_mesh();
// Time broadcast and delete
- mb.delete_mesh();
+ MBCore moab3;
+ MBInterface& mb3 = moab3;
times[4] = MPI_Wtime();
tmp_t = clock();
const char opt3[] = "PARALLEL=BCAST_DELETE;PARTITION=PARTITION;PARTITION_BY_RANK";
- rval = mb.load_file( file_name, file_set, opt3 );
+ rval = mb3.load_file( file_name, file_set, opt3 );
CHECK_ERR(rval);
times[4] = MPI_Wtime() - times[4];
times[5] = double(clock() - tmp_t) / CLOCKS_PER_SEC;
+ mb3.delete_mesh();
double max_times[6] = {0,0,0,0,0,0}, sum_times[6] = {0,0,0,0,0,0};
MPI_Reduce( ×, &max_times, 6, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD );
More information about the moab-dev
mailing list