Compilation 从gfortran移植到ifort时发生编译错误
我正在尝试将一个程序从gfortran移植到ifort(英特尔Fortran编译器11)。我遇到了两个只使用gfortran编译的文件:Compilation 从gfortran移植到ifort时发生编译错误,compilation,intel,flags,gfortran,Compilation,Intel,Flags,Gfortran,我正在尝试将一个程序从gfortran移植到ifort(英特尔Fortran编译器11)。我遇到了两个只使用gfortran编译的文件: gfortran -x f77 -c daedrid.ff gfortran -x f77-cpp-input -c daedris.ff 当我尝试使用这些文件运行“英特尔fortran编译器”时,我得到: ifort -fpp -c daedrid.ff ifort: warning #10147: no action performed for spec
gfortran -x f77 -c daedrid.ff
gfortran -x f77-cpp-input -c daedris.ff
当我尝试使用这些文件运行“英特尔fortran编译器”时,我得到:
ifort -fpp -c daedrid.ff
ifort: warning #10147: no action performed for specified file(s)
ifort -fpp -c daedris.ff
ifort: warning #10147: no action performed for specified file(s)
并且不创建任何对象文件
现在,我该如何解决这个问题
编辑:将文件扩展名从ff重命名为fpp
cp daedrid.ff daedrid.fpp
cp daedrid.ff daedrid.fpp
帮助:
ifort -fpp -c daedrid.fpp
daedrid.fpp(1483): (col. 9) remark: LOOP WAS VECTORIZED.
daedrid.fpp(1490): (col. 11) remark: LOOP WAS VECTORIZED.
daedrid.fpp(1499): (col. 13) remark: LOOP WAS VECTORIZED.
ifort -fpp -c daedris.fpp
daedris.fpp(1626): (col. 9) remark: LOOP WAS VECTORIZED.
更新:有没有一种方法可以使英特尔fortran编译器在不重命名文件的情况下工作?您要查找的选项是
-Tf
和-fpp
(可选-fixed
或-free
)。从ifort-help
中,相关行为:
-Tf<file> compile file as Fortran source
-fpp[n] run Fortran preprocessor on source files prior to compilation
n=0 disable running the preprocessor, equivalent to no fpp
n=1,2,3 run preprocessor
-[no]fixed,-FI specifies source files are in fixed format
-[no]free, -FR specifies source files are in free format
编译文件a.ff
ifort -fpp -fixed -Tfa.ff