aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/slab.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/slab.c b/src/slab.c
index 698bdac..90feccf 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -676,6 +676,8 @@ int Slab_MultiTransfer (cGH const * const cctkGH,
struct info * restrict info;
size_t srclentot, dstlentot;
+ int useghosts;
+
struct info * restrict allinfo;
struct bbox * restrict srcdetail;
struct bbox * restrict dstdetail;
@@ -727,14 +729,14 @@ int Slab_MultiTransfer (cGH const * const cctkGH,
for (d=0; d<dim; ++d) {
global2bbox (&xferinfo[d].src, &info[d].src.global);
local2bbox (&xferinfo[d].src, &info[d].src.local);
- active2bbox (&xferinfo[d].src, &info[d].src.active, 0);
+ active2bbox (&xferinfo[d].src, &info[d].src.active, useghosts);
slab2bbox (&xferinfo[d].src, &info[d].src.slab);
check (bbox_iscontained (&info[d].src.active, &info[d].src.local));
check (bbox_iscontained (&info[d].src.local, &info[d].src.global));
global2bbox (&xferinfo[d].dst, &info[d].dst.global);
local2bbox (&xferinfo[d].dst, &info[d].dst.local);
- active2bbox (&xferinfo[d].dst, &info[d].dst.active, 1);
+ active2bbox (&xferinfo[d].dst, &info[d].dst.active, 1); /* fill ghosts */
slab2bbox (&xferinfo[d].dst, &info[d].dst.slab);
check (bbox_iscontained (&info[d].dst.active, &info[d].dst.local));
check (bbox_iscontained (&info[d].dst.local, &info[d].dst.global));
@@ -852,6 +854,22 @@ int Slab_MultiTransfer (cGH const * const cctkGH,
}
}
+ {
+ CCTK_INT tmp;
+ int const iret = Util_TableGetInt (options, &tmp, "useghosts");
+ if (iret == 1) {
+ /* There was an entry, use it */
+ useghosts = tmp;
+ } else if (iret == UTIL_ERROR_BAD_HANDLE
+ || iret == UTIL_ERROR_TABLE_NO_SUCH_KEY) {
+ /* There was no entry, use a default */
+ useghosts = 0;
+ } else {
+ /* Something went wrong, abort */
+ check (0);
+ }
+ }
+
ifcheck {
ifdebug fflush (stdout);
MPI_Barrier (comm);