mpif77 not passing the -i8 flag

mpif77 not passing the -i8 flag



I just noticed that in version 13.1.1 mpif77 is not passing the flag -i8 to the ifort compiler:

$ mpif77 -i8 -show
ifort -ldl -I/lunarc/sw/alarik/pkg/intel/13.1/impi/ -L/lunarc/sw/alarik/pkg/intel/13.1/impi/ -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /lunarc/sw/alarik/pkg/intel/13.1/impi/ -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/4.1 -lmpi_ilp64 -lmpigf -lmpi -lmpigi -lrt -lpthread

while mpif90 does:

$ mpif90 -i8 -show
ifort -ldl -i8 -I/lunarc/sw/alarik/pkg/intel/13.1/impi/ -I/lunarc/sw/alarik/pkg/intel/13.1/impi/ -L/lunarc/sw/alarik/pkg/intel/13.1/impi/ -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /lunarc/sw/alarik/pkg/intel/13.1/impi/ -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/4.1 -lmpigf -lmpi -lmpigi -lrt -lpthread

Is this by design or an oversight?

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

It doesn't look like you have a normal installation of Intel software, so we can't guess the "design or oversight" of the person who set up your installation.  ifort doesn't provide mpif77 or mpif90, so you must look beyond ifort for such clues.

If Intel MPI is on your path, it's normal for mpif77 and mpif90 to invoke gfortran, not ifort.  In any case, it's not good to have a mixture of ifort with gfortran libraries.

If you built an open source MPI for ifort, you must do it with ifort but no conflicting MPI on your path for configure and build.

Sorry, I forgot to give more details. This is with Intel MPI indeed, version, and with:

export I_MPI_F77=ifort
export I_MPI_F90=ifort

so, as you can see in the first post, ifort is being used in both cases. I don't know if the mpif77 script is the one provided by Intel or has been modified by the system administrators, but it has a "Copyright (C) 2003-2013 Intel Corporation" notice on top, and it contains:

if [ "$F77" = gfortran ]; then FFLAGS="-fdefault-integer-8 $FFLAGS"; fi

Maybe this is not the right forum for the question, though. In that case I'd appreciate a pointer to the right one. Thanks.

I understand that an approved way to over-ride the default of the gfortran wrappers in Intel MPI  is by

mpif77 -fc=ifort

mpif90 -fc=ifort

Those should have the same effect as mpiifort.

I don't know about the environment variables.

The HPC and Cluster forum is good for questions about Intel MPI.

I wouldn't expect a problem in using 13.1 compilers with a nearly up to date version of Intel MPI, although you might be interested in the current release (

The issue isn't with the compiler.  It's that the mpif77 script strips out -i8, whereas the other Intel® MPI Library Fortran scripts do not.  See for the post in the HPC forum.

Leave a Comment

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