문제

나는 Gfortran에서 IFORT (Intel Fortran Compiler 11)로 프로그램을 포트하려고합니다. 나는 Gfortran으로 만 컴파일하는 두 개의 파일이 붙어 있습니다.

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)

객체 파일이 생성되지 않습니다.

이제이 문제를 어떻게 해결할 수 있습니까?

편집하다: 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

업데이트: 파일 이름을 바꾸지 않고도 인텔 포트란 컴파일러를 작동시키는 방법이 있습니까?

도움이 되었습니까?

해결책

당신이 찾고있는 옵션은입니다 -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