aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-12-22 20:41:19 -0600
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:25:51 +0000
commit9cf3756873d5606f91b2c4c7fe564b7fd742d4a0 (patch)
tree5594a88a63fcca0314426503dab11c6a1f7a1cae /Carpet/CarpetInterp
parent506379e82a0d11605d7af4264efb36557edba406 (diff)
CarpetInterp: Check that MPI datatypes are defined before using them
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index bbeeb7558..f6579bc8b 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -713,7 +713,12 @@ namespace CarpetInterp {
case N: { T dummy; datatype = dist::mpi_datatype(dummy); break; }
#include "typecase.hh"
#undef TYPECASE
- default: { CCTK_WARN (0, "invalid datatype"); abort(); }
+ default: { CCTK_WARN (CCTK_WARN_ABORT, "invalid datatype"); abort(); }
+ }
+ if (datatype == MPI_DATATYPE_NULL) {
+ CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "MPI datatype for Cactus datatype %d is not defined",
+ vtype);
}
MPI_Datatype vdatatype;
MPI_Type_vector(1, N_output_arrays, 0, datatype, &vdatatype);