This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: MPICH, IARGC, and GETARG
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Scott Robert Ladd <coyote at coyotegulch dot com>
- Date: Mon, 25 Oct 2004 15:32:27 +0100
- Subject: Re: MPICH, IARGC, and GETARG
- Organization: CodeSourcery
- References: <417D0A2E.3050907@coyotegulch.com>
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