From f416c3e4020b66b2e8e04e968acc7e9b6b04649d Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 20 Feb 2008 22:57:16 +0000 Subject: Check that the timers are initialised correctly. Some whitespace change. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@57 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8 --- src/slab.c | 69 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/slab.c b/src/slab.c index 6d44489..0c7608b 100644 --- a/src/slab.c +++ b/src/slab.c @@ -6,7 +6,7 @@ Set up the slab exchange information in advance Slab in several stages Test slabbing without MPI - Allow using / not setting the ghost zones + Allow not setting the ghost zones Allow not using / not setting the boundaries Allow different numbers of ghost zones at the lower and upper boundary */ @@ -20,6 +20,7 @@ #undef CHECK /* Omit all self-checks? (Overrides CHECK) */ +#undef NDEBUG #define NDEBUG /* Byte value for poison checks: use 255 for nan, or e.g. 113 for a @@ -73,19 +74,19 @@ CCTK_FILEVERSION(TAT_Slab_slab_c); -static int timer_init; -static int timer_copy_in; -static int timer_xfer; -static int timer_copy_back; +static int timer_init = -1; +static int timer_copy_in = -1; +static int timer_xfer = -1; +static int timer_copy_back = -1; -int -Slab_InitTimers (void) +void +Slab_InitTimers (CCTK_ARGUMENTS) { + DECLARE_CCTK_ARGUMENTS; timer_init = CCTK_TimerCreate ("Slab/init"); timer_copy_in = CCTK_TimerCreate ("Slab/copy in"); timer_xfer = CCTK_TimerCreate ("Slab/xfer"); timer_copy_back = CCTK_TimerCreate ("Slab/copy back"); - return 0; } int @@ -467,17 +468,23 @@ mpi_type (int const cactustype) struct bbox { - int off, len, str; + int off; /* offset */ + int len; /* length */ + int str; /* stride */ }; struct arrays { - struct bbox global, local, active, slab; + struct bbox global; /* global region (all processors) */ + struct bbox local; /* this processor's region */ + struct bbox active; /* ??? */ + struct bbox slab; /* the slab that should be transferred */ }; struct info { - struct arrays src, dst; - int xpose; - int flip; + struct arrays src; /* source region */ + struct arrays dst; /* destination region */ + int xpose; /* exchange axes */ + int flip; /* change directions of axes */ }; @@ -1187,8 +1194,8 @@ Slab_MultiTransfer (cGH const * restrict const cctk ifcheck assert (srcindj>=0 && srcindj=0 && srcindk=0 && srcindj=0 && srcindk=0 && dstindj=0 && dstindk=0 && dstindj=0 && dstindk=0 && dstindj=0 && dstindk=0 && dstindj=0 && dstindk