0

I'm trying to compile OpenMPI 1.10.2 using the Intel Fortran compiler (ifort) installed with graphic interface. When configuring

sudo ./configure FC="ifort" 

(as told by README to set a different compiler) I get the following error

    *** Fortran compiler
checking whether we are using the GNU Fortran compiler... no
checking whether ifort accepts -g... no
checking whether ln -s works... yes
checking if Fortran compiler works... no
**********************************************************************
* It appears that your Fortran compiler is unable to produce working
* executables.  A simple test application failed to properly
* execute.  Note that this is likely not a problem with Open MPI,
* but a problem with the local compiler installation.  More
* information (including exactly what command was given to the
* compiler and what error resulted when the command was executed) is
* available in the config.log file in the Open MPI build directory.
**********************************************************************
configure: error: Could not run a simple Fortran program.  Aborting.

Looking in the config.log file I read this:

 configure:32556: checking if Fortran compiler works
configure:32585: ifort -o conftest /opt/intel/bin/   conftest.f  >&5
./configure: line 4835: ifort: command not found
configure:32585: $? = 127
configure: program exited with status 127
configure: failed program was:
|       program main
| 
|       end
configure:32601: result: no
configure:32615: error: Could not run a simple Fortran program.  Aborting.

So I tried running ifort alone, and it works. Also, I can't find the conftest.f file.

Same issues with icc (Intel c++ compiler).

I think there is some path to put in, but don't know how.

1 Answer 1

0

Yes, your ifort should be in the PATH.

export PATH=<path_to_your_ifort_binary>:$PATH
sudo ./configure FC="ifort"

Change <path_to_your_ifort_binary> to the real directory.

The other way, Intel compiler has a script file, ifortvars.sh, which does the work with all variables for you. Taking into account that is a directory where Intel Compiler is installed, add to your ~/.bashrc:

source <install-dir>/bin/ifortvars.sh intel64

The third way to try is to use compilervars.sh from Intel Composer. Please, see here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .