[Developers] what datatype to use in inter-language APIs

Thomas Radke tradke at aei.mpg.de
Mon Jul 3 12:02:12 CDT 2006


Thomas Radke wrote:
> scalars can still be passed as native Fortran datatypes, for passing 
> literal constants in F77 code that is the only thing possible anyway.
> 
> This will work as long as the (so far) implicite assumption is true that 
> a native Fortran datatype is equivalent to the corresponding native C 
> datatype. If we had a machine where this is not true then I can't image 
> how Cactus would ever run there.

In order to get Cactus working on the T3E I remember having fixed 
something in CactusEinstein/AHFinder when calling the (old) interpolator 
API:

> ~/cactus/arrangements/CactusEinstein/AHFinder/src> cvs log AHFinder_int.F 
> ----------------------------
> revision 1.43
> date: 2001/09/04 16:06:14;  author: tradke;  state: Exp;  lines: +8 -4
> 
> Replaced constant arguments by variables with that value when calling a
> C routine from Fortran. This is to avoid potential datatype conversion problems.

This is what Erik and I mean by inconvenience. In today's code 
(including CCTK thorns and the flesh) almost nobody does such things 
anymore.
Therefore I'm quite sure that a current Cactus would fail miserably on a 
T3E if there still was one.

-- 
Cheers, Thomas.


More information about the Developers mailing list