Cactus Code Thorn CheckSync Authors : Erik Schnetter CVS info : $Header$ -------------------------------------------------------------------------- Purpose of the thorn: The thorn CheckSync provides a routine "CheckSync" that checks whether a grid function has been synchronised. This routine should be called to ensure that the calls to CCTK_SyncGroup are in the right place. As CheckSync requires communication, it is rather expensive. It has therefore to be explicitely switched on by setting the parameter "CheckSync::checksync" to "yes". If this parameter is set to "no" (the default), then the routine CheckSync does nothing. CheckSync currently requires MPI to run. Calling CheckSync in your source code is analogous to calling CCTK_SyncGroup. The header file CheckSync.h contains C prototypes. There are Fortran versions of these routines as well. You use the routine int CheckSyncGN (cGH * const cctkGH, const char * const gn); e.g. as #include #include "CheckSync.h" int ierr; ierr = CheckSyncGN (cctkGH, "ADM::metric"); assert (ierr == 0); in C, or as integer ierr call CheckSyncGN (ierr, cctkGH, "ADM::metric") if (ierr /= 0) stop in Fortran. Any thorn that uses this routine should contain the following in its interface.ccl: INHERITS: CheckSync USES INCLUDE HEADER: CheckSync.h Do not forget to activate the thorn "CheckSync" in your parameter files. If you want the checking to happen, you have to set the parameter CheckSync::checksync = yes Otherwise nothing will happen. If the grid functions are not synchronised, you will see a message on the screen, and the "ierr" return value will be nonzero. If you encounter bugs, please tell me. Tuebingen, Germany, April 14, 2002 -erik