(j3.2006) Optional parts of programming languages

Aleksandar Donev donev1
Fri Aug 24 13:44:38 EDT 2007


On Friday 24 August 2007 10:28, William B. Clodius wrote:

> requirements for C compatibility are stronger than you suggest, as some
> additional argument passing capability etc will have to be implemented
> by the vendor. 
Not that it is important to argue about details of Interop, but for me 
edification: What are these additional capabilities? Note that passing by 
VALUE is part of regular Fortran 2003, without any reference to Interop. 
Maybe it was added because of interop, but it has nothing to do with Clause 
15. All the rest seems to me to change nothing if there is no C compiler in 
sight. I mean, how can any user see the effects of whether you pass arguments 
as does a C compiler that does not exist?

We are working on a TR now for interop of assumed-shape arguments 
(descriptor-based passing). Even in this case the vendors won by making the 
feature exactly a no-op if there is no C code involved.

This is important: If I write a Fortran library to be callable by C, I should 
still be able to compile it even if C doesn't actually call it. There is no 
reason to abort compilation and ask the user to add #ifdefs to remove the 
BIND(C)'s---the whole point of Interop is to get rid of ugly conditional 
compilations.

Now, if I had my choice I would have said that C_DOUBLE and C_FLOAT should be 
Fortran double and single precision reals if the processor is its own 
companion. I see no reason to reject code using those constants if there is 
no C compiler involved.

Granted, as you said, the optionality of BIND(C) is moot---user demand will 
make it as portable as it can get...

> Co-arrays are a bit harder to implement than that
Of course, on systems where the vendors want to actually provide parallelism. 
The important point is that this is not required. We don't specify anything 
about what the number of images is and what the relation to hardware or other 
parallelization is.

Best,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev



More information about the J3 mailing list