[Developers] fortran PROVIDES FUNCTION example?

Erik Schnetter schnetter at uni-tuebingen.de
Wed Jan 21 14:42:39 CST 2004


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

On Friday 16 January 2004 17:53, Mark Miller wrote:
> Cactus folks,
>
> In trying to get my code ported to the latest-greatest development
> version (I have not updated by development version of cactus
> since sometime last fall), I find that thorn dependancies have been
> tightened in some way.  If I have a fortran routine in thornA which
> I try to call in thornB, I get an undefined reference at link time.
> I assume that one has to use the PROVIDES FUNCTION capabilities?
> Is this correct?  Is there any example in cactus-proper of providing
> fortran functions?  I can't seem to find any.  Or is there some
> other preferred mechanism/example of how one can provide fortran
> functions between thorns?

Direct calling between thorns is deprecated; try to use aliased 
functions for that.

If you must, you can create a file "configuration.ccl" in the thorn A 
directory with an entry

REQUIRES THORNS: thornB

which will force thorn B's library to be located after thorn A's, 
removing the linker error.



If you already try to used aliased function, the you probably called it 
by the wrong name: Say you have

void FUNCTION funcB (...)
PROVIDES FUNCTIONS funcB WITH myFuncB

in thorn B, then you have to call funcB in thorn A, not myFuncB, and you 
have to declare it as

void FUNCTION funcB (...)
USES FUNCTION funcB

- -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)

iD8DBQFADuQ/m3uiSwno3f0RAgH6AJ9BwPvS2h/710Bfsa8zXseNbPGICgCbB2ZW
0E7PgPitZVmhMdrbVBtvklc=
=LinZ
-----END PGP SIGNATURE-----




More information about the Developers mailing list