添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

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

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.

@physicist My advice was to call ifort directly with the output of mpif77 -showme:compile added to your command line. – casey Nov 8, 2015 at 21:05 I followed your advice but now i'm getting in addition: gfortran: error: unrecognized command line option ‘-showme:compile’ – physicist Nov 8, 2015 at 21:05 @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. – casey Nov 8, 2015 at 21:10 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. – physicist Nov 8, 2015 at 21:27

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.