[MOAB-dev] r5894 - MOAB/trunk/src/io
xbxu at mcs.anl.gov
xbxu at mcs.anl.gov
Fri Nov 30 18:05:56 CST 2012
Author: xbxu
Date: 2012-11-30 18:05:56 -0600 (Fri, 30 Nov 2012)
New Revision: 5894
Modified:
MOAB/trunk/src/io/ReadNC.cpp
Log:
declare local variables (xptr, yptr, zptr) only in parallel environment
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2012-11-30 23:51:23 UTC (rev 5893)
+++ MOAB/trunk/src/io/ReadNC.cpp 2012-12-01 00:05:56 UTC (rev 5894)
@@ -891,7 +891,10 @@
ERRORR(rval, "Couldn't create vertices in ucd mesh for gather set.");
// set vertex coordinates
- double *xptr = arrays[0], *yptr = arrays[1], *zptr = arrays[2];
+#ifdef USE_MPI
+ double *xptr = NULL, *yptr = NULL, *zptr = NULL;
+#endif
+ xptr = arrays[0], yptr = arrays[1], zptr = arrays[2];
for (unsigned int i = 0; i < num_total_verts; ++i) {
double cosphi = cos(pideg * jlVals[i]);
double zmult = sin(pideg * jlVals[i]);
More information about the moab-dev
mailing list