[Developers] should we document that CCTK_MyProc(NULL) works?
Erik Schnetter
schnetter at cct.lsu.edu
Fri Jan 12 07:48:47 CST 2007
On Jan 12, 2007, at 07:19:56, Jonathan Thornburg wrote:
> Hi,
>
> With all current drivers (or at least all known to the people I've
> talked to), it's legal to call CCTK_MyProc() with a NULL GH pointer,
> and doing so works (CCTK_MyProc() returns the correct result).
This is not quite true. With Carpet, while you do get an answer and
not a segmentation fault when passing a null pointer, the result may
differ (or may differ in the future). Without a GH, the driver can
essentially only use MPI_COMM_WORLD to find MyProc and nProcs. With
a GH, Carpet can potentially know that there are different GHs, each
associated with its own communicator, and each with different values
for MyProc and nProcs. This would be relevant in a multi-model
environment.
Tom's idea was approximately that there could be one GH which is the
global GH. When passing a null pointer, Carpet would then use that
GH implicitly.
This is currently not implemented. For multi-model simulations,
there is no global GH. Instead, each Unix process has a unique GH,
and it is this unique GH which is used if you pass a null pointer.
But this may change.
For example, when you call MyProc or nProcs while interpolating, you
should therefore always pass the same GH that you also pass to the
interpolator.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20070112/f650b2a3/attachment.bin
More information about the Developers
mailing list