diff options
Diffstat (limited to 'src/slab.c')
-rw-r--r-- | src/slab.c | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -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); |