[Pkg-scicomp-devel] fw: gfortran transition release goal proposal
Kevin B. McCarty
kmccarty at Princeton.EDU
Mon Jul 23 20:49:55 UTC 2007
Adam C Powell IV wrote:
> So it seems getarg, which is needed for mpich, is missing from gfortran,
> as are other variants used by other fortran compilers. Is there a
> gfortran equivalent?
>
> Thanks,
> -Adam
I've been using this hack for getarg, building it into the base Cernlib
library "libkernlib" only in the case of compiling with gfortran:
***** Begin getarg.F
* Wrapper GETARG routine for gfortran,
* originally written by Harald Vogt <hvogt (at) ifh (dot) de>
*
SUBROUTINE GETARG (JARG, CHARG)
* The following stuff is required to use gfortrans inline routine
* It is required to avoid the calling GETARG here which conflicts
* to the Fortran rules
CHARACTER CHARG*(*)
CALL MYGETARG (JARG, CHARG)
END
SUBROUTINE MYGETARG (JARG, CHARG)
CHARACTER CHARG*(*)
* gfortran translates the following line to a call
* to its library routine _gfortran_getarg_i4
* therefore it will not clash in the linking step
CALL GETARG (JARG, CHARG)
END
***** End getarg.F
Note, I haven't checked that this still works with gfortran-4.2.
Of course, this won't help your configure script not to fail. Also, in
the long run this is not a good solution, since there could be problems
if this object code appears in several different linked libraries
(especially if there are different versions). Would be better if the
missing getarg_ symbol could be put into libgfortran.
N.B. I want to emphasize that since I haven't uploaded a version of
Cernlib compiled against gfortran yet, this hack doesn't exist in any
object code already in Debian (to the best of my knowledge).
best regards,
--
Kevin B. McCarty <kmccarty at princeton.edu> Physics Department
WWW: http://www.princeton.edu/~kmccarty/ Princeton University
GPG: public key ID 4F83C751 Princeton, NJ 08544
More information about the Pkg-scicomp-devel
mailing list