4

プログラムを gfortran から ifort (Intel Fortran Compiler 11) に移植しようとしています。gfortran でしかコンパイルできない 2 つのファイルが残っています。

gfortran -x f77 -c daedrid.ff
gfortran -x f77-cpp-input -c daedris.ff

これらのファイルを使用して intel 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)

オブジェクトファイルは作成されません。

さて、この問題 o_O をどのように解決できますか?

編集:ファイル拡張子の名前を 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.

http://www.rcac.purdue.edu/userinfo/resources/black/userguide.cfm#compile_fortran_cpp

更新:ファイルの名前を変更せずに intel fortran コンパイラを動作させる方法はありますか?

4

1 に答える 1

5

探しているオプションは-Tfand -fpp(およびオプションで-fixedor-freeです。 From 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

したがって、全体として、前処理が必要な固定形式のソースがある場合は、次を使用します。

ifort -fpp -fixed -Tfa.ff

ファイルをコンパイルしますa.ff

于 2009-07-23T07:51:41.540 に答える