ifort composer_xe_2015.3.187 的编译问题

Compiling issue with ifort composer_xe_2015.3.187

我正在使用最新的 Fortran 编译器 composer_xe_2015.3.187 在 Ubuntu 14.04 64 位系统上编译我的 Fortran 代码。

我正在使用这个编译器标志:

-fp-model precise 

错误信息是:

f95: error: precise: No such file or directory
f95: error: unrecognized command line option ‘-fp-model’

相同的代码在旧版 ifort composerxe-2011.4.191 中不显示此错误

在 (Vanilla) Ubuntu 上,f95 是 link 到 gfortran(GNU GCC Fortran 编译器),而不是 ifort(Intel 的 Fortran编译器):

$ which f95 
/usr/bin/f95

$ ls -la /usr/bin/f95
lrwxrwxrwx 1 root root 21 Apr 15  2014 /usr/bin/f95 -> /etc/alternatives/f95

$ ls -la /etc/alternatives/f95
lrwxrwxrwx 1 root root 17 Apr 15  2014 /etc/alternatives/f95 -> /usr/bin/gfortran

gfortran不支持-fp-model

您应该改用 ifort(您可能需要编辑 Makefile)。或者,您可以将 link 更改为指向 ifort 二进制文件。