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.
Edit:
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.
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?
Thanks!
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:
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?
Thanks!
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):