Intel Fortran Problem: intel9


I have received some fortran code I’d like to compile now. With it I got instructions as to how to compile. The command to be used is:
mpif77 -compiler intel9 -O3 -ip -pad -xW -o <file> <file>.f

I have installed openMPI (so mpif77 is on my system) and the intel compiler (and I have sourced it, so ifort is known).

Only executing the above command leads to the following errors:

gfortran: intel9: file or directory not found
gfortran: unrecognized option ‘-compiler’
gfortran: unrecognized option ‘-pad’
gfortran: language W not recognized
gfortran: language W not recognized
mpif77: No such file or directory

So I figure the issue is with the command -compiler intel9 …
When I just type mpif77 it recognizes the command but has no input file (no surprise) so I figure not all the options specified in my command are recognized.

Unfortunately I don’t have enough understanding of the code let alone the necessary compiling process to know what each option is supposed to do.

Can anyone help me out?
Thanks a lot!

Getting an answer fast is very important to me. The question was also posted here:
LINUX • openSUSE - Intel Fortran Problem: intel9
I know this qualifies as crossposting but I really need an answer. Thanks for your help!

The man page doesn’t say anything about a -compiler option for mpif77, it does say you can set environment variables to point it at a specific compiler.

export OMPI_F77=/path/to/intel/compiler/executable

The path should be something like /opt/intel/compiler90/bin (or similar).

After you do that, leave the -compiler option out of your mpif77 command and it should work.

I should mention that I’m not really a fortran programmer, and I don’t have very much experience with intel’s compilers.

thanks. this is getting me a bit further - though not all the way. After linking to “ifort” I now get the following error:

gfortran: unrecognized option ‘-pad’
gfortran: language W not recognized
gfortran: language W not recognized
/usr/lib64/gcc/x86_64-suse-linux/4.3/…/…/…/…/x86_64-suse-linux/bin/ld:<file>.f: file format not recognized; treating as linker script
/usr/lib64/gcc/x86_64-suse-linux/4.3/…/…/…/…/x86_64-suse-linux/bin/ld:<file>.f:2: syntax error
collect2: ld returned 1 exit status
mpif77: No such file or directory

As you can see, the issue is now the option “-pad”. Does anyone know more about the mpif77 compiler in general and might help me out?

Hi again!

I still struggling.
I reinstalled openMPI and followed the instructions on their website (FAQ: Building Open MPI)
I also re-entered the command suggested above, only this time I did not omit the ‘-compiler intel9’ part of my command.
Here’s what I got:

mpif77 -compiler intel9 -O3 -ip -pad -xW -o <file> <file>.f

ifort: command line warning #10156: ignoring option ‘-c’; no argument required
ifort: error #10236: File not found: ‘intel9’
<file>.f(9224): warning #8043: The extra characters in the format specification will be ignored ‘(8(F16.7,1X)))’]
WRITE(14,’(8(F16.7,1X)))’) X1, X2, X3, RO_FLUC, VEL_X_FLUC,

And that’s it - it stopped there and never finished compiling. Any suggestions as to what might help?

The problem was essentially a mismatch between the 32bit compiler and a 64bit library.
Here’s what I did to make it work (just in case someone runs into the same problem):

with openMPI:

./configure OMPI_F77=/opt/intel/Compiler/11.1/056/bin/intel64/ifort --with-wrapper-fflags=’-compiler -03 -ip -pad -xW -w -02’ OMPI_FFLAGS=’-compiler -03 -ip -pad -xW -w -02’

the compiler command itsself:

mpif77 -O3 -ip -pad -xW -o <file> <file>.f

This compiled just fine.