[RegCNET] make regcm error - RegCM4

Graziano Giuliani graziano.giuliani at aquila.infn.it
Fri Oct 1 07:06:05 CEST 2010


On 10/01/2010 07:40 AM, Julie Mae Dado wrote:
[...]
> I dont understand why it's calling gfortran when I'm using ifort as my
> compiler. I'm also attaching *Makefile.inc *in this email*. *Help please.
[...]

The mpif90 is usually a wrapper around a working fortran compiler which sets for 
You all flags and paths to access MPI header files and libraries. On Your system 
the MPI stack (OpenMPI, MPICH2, any) need to be compiled also with the fortran 
compiler of Your choice (Intel one in this case) and be in Your path found 
BEFORE the usual system (Linux i suppose) one default.

If You are the administrator of Your machine:

1) Check if You have the MPI stack compiled with ifort on Your system. If not, 
we suggest the use of OpenMPI 1.4.2. I usually compile it on my system with:

CC=icc F9X=ifort F90=ifort F77=ifort FC=ifort CXX=icpc CFLAGS="-O3 -fPIC" 
CXXFLAGS="-O3 -fPIC" F90FLAGS="-O3 -fPIC" FCFLAGS="-O3 -fPIC" FFLAGS="-O3 -fPIC" 
./configure --prefix=/opt/intel/Software
make
make install

This should install the mpif90 intel under /opt/intel/Software/bin. Obviously 
the prefix path can be whatever, this is just what I use on my system.

2) Check that the path to the intel compiled mpif90 is searched before system 
one. If not, the system using GNU compiler is found first and used instead, 
leading to the above error You report. I usually have this lines in my 
.bash_profile, related to the above prefix used in compiling MPI stack:

export PATH=/opt/intel/Software/bin:$PATH
export LD_LIBRARY_PATH=/opt/intel/Software/lib:$LD_LIBRARY_PATH
export MANPATH=/opt/intel/Software/share/man:$MANPATH

If You want it to be used system wide, check Your System documentation on the 
correct file to add those lines (on my linux box this is adding a file under 
/etc/profile.d directory with the .sh suffix). Obviously this is for bash shell, 
if You use csh, tcsh or any other command shell the above lines have to be 
adapted to the correct syntax.

If You are not the system administrator of Your machine, please ask Your IT dept 
to perform these tasks or use a prefix path in your home directory where You 
have write privileges (i.e. /home/YYYYY/openmpi where YYYYY is Your username).

Ciao!

Graziano.



More information about the RegCNET mailing list