[Developers] fortran PROVIDES FUNCTION example?

Bela Szilagyi bela at einstein.phyast.pitt.edu
Thu Jan 22 05:33:03 CST 2004

How about placing a set of fortran functions (or subroutines) within a
thorn into a module and accessing them from within another thorn by using
the module?  This requires some inter-thorn dependencies as well, granted.  
But I can, this way, call my fortran routines directly (from fortran).

Is this anything that would eventually become deprecated as well?

On Thu, 22 Jan 2004, Erik Schnetter wrote:

> 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.
> Version: GnuPG v1.2.4 (GNU/Linux)
> iD8DBQFAD56gm3uiSwno3f0RAhbOAJ97XvS5/T/Vo8QNaTbSrCl2bHP5AgCeOoKG
> =qM4J
> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers

Bela Szilagyi - (412) 624-9089
bela at einstein.phyast.pitt.edu

More information about the Developers mailing list