This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MPICH, IARGC, and GETARG


On Monday 25 October 2004 15:14, Scott Robert Ladd wrote:
> I've built MPICH 1.2.6 on my Opteron box. Trying to compile Fortran 90
> programs with gfortran results in the following link errors:
>
> /root/mpich-1.2.6/lib/libmpich.a(farg.o)(.text+0x6): In function
>
> `mpir_iargc__':
> : undefined reference to `f__xargc'
>
> /root/mpich-1.2.6/lib/libmpich.a(farg.o)(.text+0x38): In function
>
> `mpir_getarg__':
> : undefined reference to `getarg_'
>
<...>
> Being very tired (a death in the family over the weekend), I may be
> missing something here. Apparently, gfortran is treating IARGC and
> GETARG as callable functions instead of intrinsics, at least in the case
> of MPICH. Am I missing something obvious here?

Looks like you're using g77 to compile that bit of code, not gfortran.

If this was deliberate you need to also link in the g77 runtime (libg2c). In 
theory you should be able to link both the gfortran and g77 runtimes into the 
same executable.

If it wasn't deliberate, YYou  need to double-check the mpich configure/build 
setup. One possibility is that it's using "gcc file.f", which is then using 
the system g77.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]