[MOAB-dev] r5779 - in MOAB/trunk: src/io src/parallel src/parallel/moab test/io test/parallel
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Tue Oct 9 16:50:12 CDT 2012
Author: iulian
Date: 2012-10-09 16:50:12 -0500 (Tue, 09 Oct 2012)
New Revision: 5779
Added:
MOAB/trunk/test/parallel/ucdtrvpart.cpp
Modified:
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/io/ReadNC.hpp
MOAB/trunk/src/parallel/ParallelComm.cpp
MOAB/trunk/src/parallel/gs.cpp
MOAB/trunk/src/parallel/moab/ParallelComm.hpp
MOAB/trunk/test/io/read_ucd_nc.cpp
MOAB/trunk/test/parallel/Makefile.am
Log:
first crack at nodal partition for homme reader.
It is not ready yet, nothing else should be affected
it passes tests in serial and parallel
Also, introduce a test for trivial partition; right now, it is just
testing the number of nodes owned by each processor, but it should also test
some tag values.
one more change: the option to read using trivial partition should be passed
as "PARTITION_METHOD=TRIVIAL_PARTITION"
before, it was simply "TRIVIAL_PARTITION"
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2012-10-09 18:38:45 UTC (rev 5778)
+++ MOAB/trunk/src/io/ReadNC.cpp 2012-10-09 21:50:12 UTC (rev 5779)
@@ -35,7 +35,7 @@
ReadNC::ReadNC(Interface* impl) :
mbImpl(impl), CPU_WORD_SIZE(-1), IO_WORD_SIZE(-1), fileId(-1), tMin(-1), tMax(-1), iDim(-1), jDim(-1), tDim(-1), iCDim(-1),
jCDim(-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), partMethod(-1), ucdMesh(false)
+ max_str_length(-1), vertexOffset(0), dbgOut(stderr), isParallel(false), partMethod(-1), ucdMesh(false), npMesh(false)
#ifdef USE_MPI
, myPcomm(NULL)
@@ -81,6 +81,7 @@
mCurrentMeshHandle = 0;
vertexOffset = 0;
ucdMesh = false;
+ npMesh = false;
#ifdef USE_MPI
myPcomm = NULL;
@@ -217,6 +218,10 @@
rval = init_HOMMEucd_vals(opts);
if (MB_SUCCESS == rval) {
ucdMesh = true;
+ if (opts.match_option("PARTITION_METHOD", "NODAL_PARTITION") == MB_SUCCESS)
+ {
+ npMesh=true;
+ }
}
}
// else if dimension names "lon" and "lat' exist then it's the Eulerian Spectral grid
@@ -238,11 +243,13 @@
ERRORR(rval, "Mesh characteristics didn't match from last read.\n");
}
else if (!nomesh) {
- if (ucdMesh)
+ if (npMesh)
+ rval = create_np_verts_quads(opts, tmp_set, quads);
+ else if (ucdMesh)
rval = create_ucd_verts_quads(opts, tmp_set, quads);
else
rval = create_verts_quads(scdi, tmp_set, quads);
- ERRORR(rval, "Trouble creating vertices.");
+ ERRORR(rval, "Trouble creating vertices and quads.");
}
// Read variables onto grid
@@ -277,12 +284,15 @@
if (ucdMesh && !novars)
{
More information about the moab-dev
mailing list