[Developers] fortran PROVIDES FUNCTION example?

Erik Schnetter schnetter at uni-tuebingen.de
Thu Jan 22 03:57:52 CST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 22 January 2004 10:27, Ian Hawke wrote:
> On Wed, 21 Jan 2004, Mark Miller wrote:
> > Right.  I've been aliasing all of my inter-thorn function calls.
> > However, with the CactusEOS thorns, there are arguments like
>
> As an aside that I forgot to put in the last mail, note that aliased
> functions are a pretty indirect (hence slow). The range is from (I
> believe) two levels of indirection (for, e.g., direct Fortran to
> Fortran simple calls) up to five or six (cross language with cross
> language function pointers and strings). I haven't used function
> aliasing for CactusEOS as I didn't want to pay the overhead. Equally,
> I haven't measured it so I don't know how expensive it might be.

As a rule of thumb, everything that is done per grid point (in a loop 
over grid points) should be a direct interaction between you and the 
compiler.  Invoking Cactus (as in: using CCTK_EQUALS, calling 
CCTK_IsThornActive, etc.) is best avoided.  I've measured overheads of 
about 25% of the total run time in these cases.  Which means, on the 
other hand, if you have never run a profiler on your code, you should 
not worry at all, because it is not orders of magnitude.

- -erik

- -- 
Erik Schnetter <schnetter at aei.mpg.de>   http://www.aei.mpg.de/~eschnett/

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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAD56gm3uiSwno3f0RAhbOAJ97XvS5/T/Vo8QNaTbSrCl2bHP5AgCeOoKG
F4BYUHgQ8QFTKSxPW5wJ78k=
=qM4J
-----END PGP SIGNATURE-----




More information about the Developers mailing list