[mpich-discuss] Problem with compiling mpi fortran programs (btio benchmark)

Gus Correa gus at ldeo.columbia.edu
Fri May 8 16:37:55 CDT 2009


Hi Christina

1) You should specify MPIF77=/full/path/to/mpich2-1.0.8/bin/mpif77.
The mpif77 wrapper knows where to find include files and libraries you
need for compilation.

If you need to compile MPI programs, use the wrappers, not the compilers
directly, unless you have a very specific requirement that prevents you
from using the wrappers.

2) If this fails, rebuild mpich2-1.0.8 with gfortran, instead of f77.
f77 (a soft link to g77) is old, probably obsolete.
You can specify gfortran during configure, otherwise it may pick
f77 by default.


I hope this helps,
Gus Correa
---------------------------------------------------------------------
Gustavo Correa
Lamont-Doherty Earth Observatory - Columbia University
Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------


Christina Patrick wrote:
> Hi All,
> 
> I am trying to use the BTIO benchmark (included in NAS Parallel
> Benchmark 3.2 suite) on Linux ... basically trying to compile the mpi
> programs in NPB3.2/NPB3.2-MPI/BT benchmark dir with the command line:
> 
> # make bt NPROCS=4 CLASS=D SUBTYPE=full
> 
> When I specify
> MPIF77 = f77 (which is the compiler used by mpif77), I get the compile error:
> 
> -->randi8.f: In function `randlc':
> -->randi8.f:23:
> -->         data i246m1/X'00003FFFFFFFFFFF'/
> -->                       ^
> -->Integer at (^) too large
> -->randi8.f: In subroutine `vranlc':
> -->randi8.f:53:
> -->         data i246m1/X'00003FFFFFFFFFFF'/
> -->                       ^
> -->Integer at (^) too large
> -->make[1]: *** [../common/randi8.o] Error 1
> 
> 
> Basically, I think that f77 is not supporting the datatype "integer*8"
> since the var i246m1 is declared as integer*8
> I am able to circumvent this error if I use the compiler MPIF77 =
> gfortran and use the the compiler flag "-fno-range-check"
> However, now I get a compiler error:
> 
> 
> -->/usr/bin/ld: skipping incompatible
> mpich2-1.0.8/install/lib/libfmpich.a when searching for -lfmpich
> -->/usr/bin/ld: cannot find -lfmpich
> -->collect2: ld returned 1 exit status
> -->make[2]: *** [bt-full] Error 1
> 
> 
> Then I tried compiling the programs under "mpich2-1.0.8/examples/f77"
> and I get the same problem.
> 
> If anybody has compiled the mpi part in the btio benchmark or if you
> have experience with compiling fortran programs, could you please help
> me?
> 
> Thanks and Regards,
> Christina.



More information about the mpich-discuss mailing list