mpif90 from cluster toolkit pointing to gfortran

mpif90 from cluster toolkit pointing to gfortran

Recently purchased cluster toolkit and installed without issues. When compiling a software program (wien2k), I can compile in serial using ifort. However, when I attempt to compile in parallel, using the mkl and mpi libraries, apparently the mpif90 compiler is pointing to gfortran instead of the ifort compiler that accompanies the cluster toolkit. Is this supposed to occur? Is there a way to change this?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Ben,

Quoting Ben Beeler... apparently the mpif90 compiler is pointing to gfortran instead of the ifort compiler that accompanies the cluster toolkit. Is this supposed to occur?

Indeed, that's the expected behavior of the Intel MPI Library mpif90 script. If you look at Section 2.1 "Compiler Commands" in the Reference Manual (included in the /doc directory or available for download here), you'll see that, by default, mpif90 would use the GNU FORTRAN compilers. If you'd like to use the Intel Fortran compilers, you need to use the mpiifort script instead.

Hope this helps. Let us know how it goes.

Regards,
~Gergana

Gergana Slavova
Technical Consulting Engineer
Intel® Cluster Tools
E-mail: gergana.s.slavova_at_intel.com

Note that if you want to use mpif90/mpicc/etc (eg for existing configure scripts/Makefiles, etc) with the Intel compilers, one need only modify environment variables to point to the appropriate compilers: eg,

export I_MPI_CC=icc
export I_MPI_CXX=icpc
export I_MPI_F77=ifort
export I_MPI_F90=ifort

for bash-type shells, or

setenv I_MPI_CC icc
setenv I_MPI_CXX icpc
setenv I_MPI_F77 ifort
setenv I_MPI_F90 ifort

for csh-type shells.

--
Jonathan Dursi

Great point! Also, if we're talking options, you can use a flag like this:

mpif90 -f90=ifort ...

This is all assuming ifort in your PATH. If not, just specify the full path when using the flag or the env variable.

Regards,
~Gergana

Gergana Slavova
Technical Consulting Engineer
Intel® Cluster Tools
E-mail: gergana.s.slavova_at_intel.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today