[ET Trac] [Einstein Toolkit] #434: Keep track of masked-out volume in CarpetMask
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Tue Nov 6 10:26:39 CST 2012
#434: Keep track of masked-out volume in CarpetMask
--------------------------+-------------------------------------------------
Reporter: eschnett | Owner: eschnett
Type: enhancement | Status: review
Priority: blocker | Milestone: ET_2012_11
Component: Carpet | Version:
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment (by eschnett):
The commit mentioned above corrected the routine
CarpetSimpleMPIDatatypeLength, but not the sibling routine
CarpetSimpleMPIDatatype. Maybe this inconsistency leads to problems.
If so, this patch may help:
{{{
$ git diff .
diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc
index 3b5ebb2..7fb36f1 100644
--- a/Carpet/Carpet/src/helpers.cc
+++ b/Carpet/Carpet/src/helpers.cc
@@ -347,33 +347,23 @@ namespace Carpet {
MPI_Datatype CarpetSimpleMPIDatatype (const int vartype)
{
switch (vartype) {
-#ifdef CARPET_COMPLEX
case CCTK_VARIABLE_COMPLEX:
return CarpetMPIDatatype (CCTK_VARIABLE_REAL);
-#endif
-#ifdef CARPET_COMPLEX8
-# ifdef HAVE_CCTK_COMPLEX8
+#ifdef HAVE_CCTK_COMPLEX8
case CCTK_VARIABLE_COMPLEX8:
return CarpetMPIDatatype (CCTK_VARIABLE_REAL4);
-# endif
#endif
-#ifdef CARPET_COMPLEX16
-# ifdef HAVE_CCTK_COMPLEX16
+#ifdef HAVE_CCTK_COMPLEX16
case CCTK_VARIABLE_COMPLEX16:
return CarpetMPIDatatype (CCTK_VARIABLE_REAL8);
-# endif
#endif
-#ifdef CARPET_COMPLEX32
-# ifdef HAVE_CCTK_COMPLEX32
+#ifdef HAVE_CCTK_COMPLEX32
case CCTK_VARIABLE_COMPLEX32:
return CarpetMPIDatatype (CCTK_VARIABLE_REAL16);
-# endif
#endif
- default:
- return CarpetMPIDatatype (vartype);
}
- // notreached
- return MPI_CHAR;
+ // default
+ return CarpetMPIDatatype (vartype);
}
int CarpetSimpleMPIDatatypeLength (const int vartype)
@@ -390,11 +380,9 @@ namespace Carpet {
case CCTK_VARIABLE_COMPLEX32:
#endif
return 2;
- default:
- return 1;
}
- // notreached
- return 0;
+ // default
+ return 1;
}
}}}
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/434#comment:22>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list