3

I have just started my work with FORTRAN and I want to compile a program. This is what I'm receiving from compiler after writing make in command line.

mpif77 -c                    -mcmodel=medium -i-dynamic -no-ipo -r8 -xW -traceback     -O2                    ../agile/agile_parameter_module.f
gfortran: error: unrecognized command line option ‘-i-dynamic’
gfortran: error: unrecognized command line option ‘-no-ipo’
gfortran: error: unrecognized command line option ‘-r8’
gfortran: error: unrecognized command line option ‘-traceback’

I have downloaded and install trial version of Intel Fortran Compiler but make still uses gfortran and I got that message.

1
  • 2
    You need to use the MPI compiler (wrapper) from Intel, or compile MPICH/OpenMPI using the Intel compiler, and then use the resulting wrapper. Commented Nov 3, 2015 at 20:16

1 Answer 1

1

The mpif77 wrapper you are using has been configured for gfortran, which does not understand options for ifort. If you don't have the cluster tools for Intel Fortran you won't have their MPI wrapper mpiifort and will have to configure openmpi to use ifort.

If you want to avoid compiling openmpi to set it up for ifort you can try to use the MPI wrapper for gfortran with ifort like this:

ifort <ifort command line arguments> `mpif77 -showme:compile`

for the compile steps and

ifort <ifrot command line arguments> `mpif77 -showme:link`

for the link steps.

If those don't work directly you can look at the options emitted by mpif77 and modify them for ifort as needed. This is a stop-gap solution just to get your software built but for a long term solution you should properly set up openmpi to use ifort.

Sign up to request clarification or add additional context in comments.

5 Comments

@physicist My advice was to call ifort directly with the output of mpif77 -showme:compile added to your command line.
I followed your advice but now i'm getting in addition: gfortran: error: unrecognized command line option ‘-showme:compile’
Ok, now ifort: not found. Is it possible to compile that without Intel Compiler?
@physicist Youd have to change the command line arguments into the gfortran equivalent. Also if you can't run ifort you need to review your installation instructions and make sure you are sourcing the ifort environment as required. E.g. source /opt/intel/bin/ifortvars.sh intel64. Please review your docs before running that as it might not be right for your system of default shell.
Something was happened, i've got a lot of object files but also errors e.g ifort: command line remark #10148: option '-i-dynamic' not supported, ifort: command line remark #10148: option '-i-dynamic' not supported, ifort: command line remark #10148: option '-i-dynamic' not supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.