Übersetzungsfehler während von gfortran Portierung auf ifort
-
06-07-2019 - |
Frage
Ich versuche, ein Programm von gfortran in dem Hafen zu ifort (Intel Fortran Compiler 11). Ich bin mit zwei Dateien stecken, die nur mit gfortran kompilieren:
gfortran -x f77 -c daedrid.ff
gfortran -x f77-cpp-input -c daedris.ff
, wenn ich versuche Intel Fortran Compiler mit diesen Dateien zu laufen, erhalte ich:
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)
und keine Objektdateien erstellt werden.
Nun, wie kann ich dieses Problem lösen o_O?
EDIT: Umbenennen der Datei-Erweiterungen von ff fpp
cp daedrid.ff daedrid.fpp
cp daedrid.ff daedrid.fpp
hilft:
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
UPDATE: Gibt es eine Möglichkeit, den Intel Fortran Compiler Arbeit zu machen, ohne die Dateien umbenennen mit
Lösung
Die Optionen Sie suchen sind -Tf
und -fpp
(und optional -fixed
oder -free
Von ifort -help
, die entsprechenden Linien sind:
-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
Also, alles in allem, wenn Sie mit fester Form Quelle, die Vorverarbeitung benötigt, verwenden Sie:
ifort -fpp -fixed -Tfa.ff
Datei a.ff
kompilieren.