Next: Cactus Application Interfaces
Up: Writing a Thorn
Previous: Staggertypes
Contents
Parallelisation
The flesh itself does not actually set up grid variables. This
is done by a driver thorn. To allow the distribution of
a grid over a number of processors, the driver thorn must
also provide the grid decomposition, and routines to enable
parallelisation. The method used to provide this parallelisation
(e.g. MPI, PVM) is not usually important for the thorn writer, since
the driver thorn provides routines which are called by standard interfaces
from the flesh. Here, we describe briefly the most important of these routines
for the application thorn writer. A more detailed description
of these interfaces with their arguments, is given in the Reference Manual.
A complete description of the
routines that a driver thorn must provide, will be provided in the
Infrastructure Thorn Writers Guide (Part D). The standard driver thorn is
currently PUGH in the CactusPUGH package, which
is a parallel unigrid driver.
- CCTK_nProcs
- Returns the number of processors being used
- CCTK_MyProc
- Returns the processor number (this starts at
processor number zero)
- CCTK_SyncGroup, CCTK_SyncGroupsI
- Synchronises either a single
group or a set of groups of grid arrays by
exchanging the values held in each processor ghostzones, with the
physical values of their neighbours (see the Reference Manual)
- CCTK_Barrier
- Waits for all processors to reach this point
before proceeding
Next: Cactus Application Interfaces
Up: Writing a Thorn
Previous: Staggertypes
Contents
|