[MOAB-dev] r4941 - in MOAB/trunk/src: io parallel parallel/moab
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Fri Jun 3 10:45:09 CDT 2011
Author: tautges
Date: 2011-06-03 10:45:09 -0500 (Fri, 03 Jun 2011)
New Revision: 4941
Modified:
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/io/ReadNC.hpp
MOAB/trunk/src/parallel/ParallelMergeMesh.cpp
MOAB/trunk/src/parallel/moab/ParallelMergeMesh.hpp
Log:
Bug fix for parallel merging, where last tuple in a sequence of merges wasn't
being accounted for.
Adding a few different partitioning methods in for climate data, and modified
option mechanism for choosing between them:
PARTITION_METHOD=1: partition the j, or k, or i space only
= 2: choose evenly-spaced jk partition
= 3: try for square ij partition
= 4: try for square jk partition
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 15:40:53 UTC (rev 4940)
+++ MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 15:45:09 UTC (rev 4941)
@@ -17,10 +17,10 @@
#include "moab/ScdInterface.hpp"
#define ERRORR(rval, str) \
- if (MB_SUCCESS != rval) {readMeshIface->report_error(str); return rval;}
+ if (MB_SUCCESS != rval) {readMeshIface->report_error("%s", str); return rval;}
#define ERRORS(err, str) \
- if (err) {readMeshIface->report_error(str); return MB_FAILURE;}
+ if (err) {readMeshIface->report_error("%s", str); return MB_FAILURE;}
namespace moab {
@@ -34,7 +34,7 @@
iDim(-1), jDim(-1), kDim(-1), tDim(-1), numUnLim(-1), mCurrentMeshHandle(0),
startVertex(0), startElem(0), mGlobalIdTag(0),
max_line_length(-1), max_str_length(-1), vertexOffset(0), dbgOut(stderr),
- isParallel(false), use2DPartition(false)
+ isParallel(false), partMethod(-1)
#ifdef USE_MPI
, myPcomm(NULL)
#endif
@@ -236,9 +236,7 @@
const int rank = myPcomm->proc_config().proc_rank();
dbgOut.set_rank(rank);
- if (MB_SUCCESS == opts.get_null_option("2D_PARTITION"))
- use2DPartition = true;
-
+ opts.get_int_option("PARTITION_METHOD", partMethod);
#endif
return MB_SUCCESS;
@@ -708,18 +706,38 @@
ErrorCode rval;
#ifdef USE_MPI
if (isParallel) {
- if (use2DPartition)
- rval = compute_partition_2(ilMin, ilMax, jlMin, jlMax, klMin, klMax);
- else
- rval = compute_partition_1(ilMin, ilMax, jlMin, jlMax, klMin, klMax);
-
+ switch (partMethod) {
+ case 1:
+ case -1:
+ compute_partition_alljorkori(myPcomm->proc_config().proc_size(),
+ myPcomm->proc_config().proc_rank(),
More information about the moab-dev
mailing list