From 5d9cf6b6570334ab9c8078790c61d091fcb8b78a Mon Sep 17 00:00:00 2001 From: eschnett Date: Tue, 8 Jan 2013 18:45:50 +0000 Subject: Catch internal inconsistency with too few grid points per process Check that there are enough grid points to send while synchronizing. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@519 b61c5cb5-eaca-4651-9a7a-d64986f99364 --- src/PostSendGA.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PostSendGA.c b/src/PostSendGA.c index 22f11b5..b462c52 100644 --- a/src/PostSendGA.c +++ b/src/PostSendGA.c @@ -107,6 +107,11 @@ void PostSendGA(pGH *pughGH, int dir, pComm *comm) iend = GA->extras->overlap[1][dir]; iterator = GA->extras->iterator; + if (iend[0] > GA->extras->nsize[0]) + { + CCTK_WARN (CCTK_WARN_ABORT, "Internal error in communication descriptor: Trying to send data that don't exist. (This may happen if a process has too few grid points.)"); + } + /* set iterator to the start vector */ for(dim = 0; dim < GA->extras->dim; dim++) { -- cgit v1.2.3