[MOAB-dev] r4375 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue Dec 14 22:19:56 CST 2010
Author: tautges
Date: 2010-12-14 22:19:55 -0600 (Tue, 14 Dec 2010)
New Revision: 4375
Modified:
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/io/ReadNC.hpp
Log:
Sigh; need ptrdiff_t instead of size_t for one of the arg types.
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2010-12-15 02:38:54 UTC (rev 4374)
+++ MOAB/trunk/src/io/ReadNC.cpp 2010-12-15 04:19:55 UTC (rev 4375)
@@ -608,6 +608,7 @@
klMin = kMin; klMax = kMax;
// parse options to get subset
+#ifdef USE_MPI
if (isParallel) {
// partition *the elements* over the parametric space; 1d partition for now, in the k parameter
// (or j if there isn't one)
@@ -631,6 +632,7 @@
ilMin = iMin; ilMax = iMax;
}
}
+#endif
opts.get_int_option("IMIN", ilMin);
opts.get_int_option("IMAX", ilMax);
@@ -708,7 +710,7 @@
// check to make sure it's a float or double
int fail;
NCDF_SIZE tmin = lmin, tcount = lmax - lmin + 1;
- NCDF_SIZE dum_stride = 1;
+ NCDF_DIFF dum_stride = 1;
if (NC_DOUBLE == (*vmit).second.varDataType) {
cvals.resize(tcount);
fail = NCFUNCA(get_vars_double)(fileId, (*vmit).second.varId, &tmin, &tcount, &dum_stride, &cvals[0]);
Modified: MOAB/trunk/src/io/ReadNC.hpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.hpp 2010-12-15 02:38:54 UTC (rev 4374)
+++ MOAB/trunk/src/io/ReadNC.hpp 2010-12-15 04:19:55 UTC (rev 4375)
@@ -32,11 +32,13 @@
# define NCFUNC(func) ncmpi_ ## func
# define NCFUNCA(func) ncmpi_ ## func ## _all
# define NCDF_SIZE MPI_Offset
+# define NCDF_DIFF MPI_Offset
#else
# include "netcdf.h"
# define NCFUNC(func) nc_ ## func
# define NCFUNCA(func) nc_ ## func
# define NCDF_SIZE size_t
+# define NCDF_DIFF ptrdiff_t
#endif
namespace moab {
More information about the moab-dev
mailing list