[mpich-discuss] MPICH 2 installation errors
chan at mcs.anl.gov
chan at mcs.anl.gov
Thu Aug 12 23:50:38 CDT 2010
> > configure: error: **** Incompatible Fortran and C Object File
> Types! ****
> > F77 Object File Type produced by "gfortran -O2" is : : Mach-O
> object i386.
> > C Object File Type produced by "gcc -O2" is : : Mach-O 64-bit
> object x86_64.
>
> Yes, this message is a 32/64-bit compatibility issue. Your fortran
> compiler is outputting 32-bit by default, but your C compiler is
> outputting 64-bit by default. The GNU compilers (and many other
> compilers) accept "-m32" or "-m64" options to force the corresponding
> output mode. The easiest way to set them is usually something like:
>
> /path/to/configure CC="gcc -m32" F77="gfortran -m32" FC="gfortran
> -m32" OTHER_CONFIG_ARGS...
Since you are using MPICH2-1.2.x, you should use F90 (not FC) to
set Fortran 90+ compiler (FC in 1.2.x and older releases is the
same as F77), i.e.
/path/to/configure CC="gcc -m32" F77="gfortran -m32" F90="gfortran -m32" CXX="g++ -m32" OTHER_CONFIG_ARGS...
In the upcoming 1.3 release, F90/F90FLAGS are being
replaced by FC/FCFLAGS. So the configure command will
be exactly like what Dave said.
A.Chan
More information about the mpich-discuss
mailing list