diff options
-rw-r--r-- | src/slab.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -88,13 +88,13 @@ void Slab_PrintTimers (void) /* Find out which driver to use */ #ifdef CCTK_MPI -# if defined CARPET_CARPET +# if defined CARPET_CARPET || defined CARPETORIG_CARPET # include "Carpet/Carpet/src/carpet_public.h" # endif # if defined CACTUSPUGH_PUGH # include "CactusPUGH/PUGH/src/include/pugh.h" # endif -# if ! defined CARPET_CARPET && ! defined CACTUSPUGH_PUGH +# if ! defined CARPET_CARPET && ! defined CARPETORIG_CARPET && ! defined CACTUSPUGH_PUGH # error "No supported driver thorn included" # endif #endif @@ -269,7 +269,7 @@ static MPI_Comm get_mpi_comm (const cGH * restrict const cctkGH) { #ifdef CCTK_MPI -# if defined CARPET_CARPET +# if defined CARPET_CARPET || defined CARPETORIG_CARPET if (CCTK_IsThornActive ("Carpet")) { return CarpetMPIComm (); } @@ -1003,11 +1003,11 @@ if (n<size-1) assert (srcoffset[n+1]==srcoffset[n]+srcdetailleni*srcdetaillenj*s int const srcindi = srcdetailoffi + i - srcoffi; int const srcindj = srcdetailoffj + j - srcoffj; int const srcindk = srcdetailoffk + k - srcoffk; + size_t const srcind = srcindi + srcleni * (srcindj + srclenj * srcindk); + size_t const bufind = i + srcdetailleni * (j + srcdetaillenj * k); ifcheck assert (srcindi>=0 && srcindi<srcleni); ifcheck assert (srcindj>=0 && srcindj<srclenj); ifcheck assert (srcindk>=0 && srcindk<srclenk); - size_t const srcind = srcindi + srcleni * (srcindj + srclenj * srcindk); - size_t const bufind = i + srcdetailleni * (j + srcdetaillenj * k); ((CCTK_REAL*)srcdata)[srcoffset[n] + bufind] = ((const CCTK_REAL*)srcptr)[srcind]; } } @@ -1129,10 +1129,10 @@ if (n<size-1) assert (srcoffset[n+1]==srcoffset[n]+srcdetailleni*srcdetaillenj*s int const dstindi = dstdetailoffi + i - dstoffi; int const dstindj = dstdetailoffj + j - dstoffj; int const dstindk = dstdetailoffk + k - dstoffk; + size_t const dstind = dstindi + dstleni * (dstindj + dstlenj * dstindk); ifcheck assert (dstindi>=0 && dstindi<dstleni); ifcheck assert (dstindj>=0 && dstindj<dstlenj); ifcheck assert (dstindk>=0 && dstindk<dstlenk); - size_t const dstind = dstindi + dstleni * (dstindj + dstlenj * dstindk); ((CCTK_REAL*)dstptr)[dstind] = ((const CCTK_REAL*)dstdata)[dstoffset[n] + bufind]; } } |