質問

プログラムをgfortranからifortに移植しようとしています(Intel Fortranコンパイラー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

helps:

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コンパイラを動作させる方法はありますか?

役に立ちましたか?

解決

探しているオプションは、 -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

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

ifort -fpp -fixed -Tfa.ff

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top