Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 ディスカッション

-gen-dep with *.F90 files

Sergey_L_
ビギナー
2,277件の閲覧回数

For the file hw.F90 (note the suffix .F90) [fortran]program hw print *, "hello world" end program hw[/fortran] ifort -gen-dep hw.F90 returns [bash]hw.o: hw.F90 /tmp/ifort6aqMLI.i90: hw.F90 /tmp/ifortDW5ocn.o : \ /tmp/ifort6aqMLI.i90[/bash] Is it a bug or intended behavior source files, must be preprocessed? My system is [bash]ifort (IFORT) 13.1.1 20130313 Linux 2.6.37.6-24-desktop #1 SMP PREEMPT 2012-10-18 22:36:08 +0200 x86_64 x86_64 x86_64 GNU/Linux[/bash]

0 件の賞賛
1 解決策
Kevin_D_Intel
従業員
2,277件の閲覧回数

I found an earlier defect report related to the temporary file names and note the advised work around of adding: -save-temps

This changes the output for your case as follows:

$ ifort -gen-dep -save-temps hw.F90
hw.o: hw.F90
hw.i90: hw.F90
hw.o : \
  hw.i90

Perhaps that is of some help.

元の投稿で解決策を見る

10 返答(返信)
Sergey_L_
ビギナー
2,277件の閲覧回数

> Is it a bug or intended behavior source files, must be preprocessed? I mean: Is it a bug or intended behavior for the source files, which must be preprocessed?

Kevin_D_Intel
従業員
2,277件の閲覧回数

Source files need not be preprocessed when using -gen-dep. The .F90 suffix implies preprocessing hence the .i90 you noted.

I'm not sure whether that answers your question.

Kevin_D_Intel
従業員
2,277件の閲覧回数

Ok, so is the inclusion of the .i90 file as a dependency correct or not. It seems not. I'll inquire w/others and post another reply soon.

Sergey_L_
ビギナー
2,277件の閲覧回数

I will restate my question because I lost a battle with a forum's
parser and cannot find a way to edit the original post.

For the file hw.F90 (note the suffix .F90)

program hw
  print *, "hello world"
end program hw

`ifort -gen-dep hw.F90' returns

hw.o: hw.F90                                                                                                                  
/tmp/ifort6aqMLI.i90: hw.F90
/tmp/ifortDW5ocn.o : \
  /tmp/ifort6aqMLI.i90

Is it a bug or intended behavior for the source files, which must be
preprocessed?

> The .F90 suffix implies preprocessing hence the .i90 you noted.
> I'm not sure whether that answers your question.

It does. I wanted to use the output of `ifort -gen-dep' to generated
dependencies in a makefile but the references to temporary files make
it difficult. I will try to find another way.

Kevin_D_Intel
従業員
2,278件の閲覧回数

I found an earlier defect report related to the temporary file names and note the advised work around of adding: -save-temps

This changes the output for your case as follows:

$ ifort -gen-dep -save-temps hw.F90
hw.o: hw.F90
hw.i90: hw.F90
hw.o : \
  hw.i90

Perhaps that is of some help.

Sergey_L_
ビギナー
2,277件の閲覧回数
> This changes the output for your case as follows Thanks. It helps.
Kevin_D_Intel
従業員
2,277件の閲覧回数

I’m glad that will help. Thank you for the Best Reply. I appreciate that.

I associated this thread with the earlier defect report (see internal tracking id below) which should address the unnecessary appearance of the .i90 file and appearance of temporary file names as legitimate dependencies. I will post with progress on a resolution as I learn it.

(Internal tracking id: DPD200167190)
(Resolution Update on 09/15/2014): This defect is fixed in the Intel® Parallel Studio XE 2015 Initial Release (2015.0.090 - Linux)

Izaak_Beekman
新規コントリビューター II
2,277件の閲覧回数

I'm curious whether adding -fpp will change the output of -gen-dep.

Also, I find this tool of little utility because it requires that any used modules' .mod files are present before you run it. For dependency resolution purposes, one should be able to run the tool in any order. I agree, however, that this is very difficult or impossible to do for fortran.

I prefer using CMake which has pretty good Fortran dependency resolution capabilities, even with modern Fortran. I have yet to come across a case that it had trouble with. You just make lists of source files and it figures out what order to compile them in for you.

Lorri_M_Intel
従業員
2,277件の閲覧回数

On Linux, naming the file .F90 effectively adds the command line option "-fpp" anyway, so should be no difference in gen-dep output.

 

Kevin_D_Intel
従業員
2,277件の閲覧回数

I confirmed this issue is resolved (see below) in the Intel® Parallel Studio XE 2015 release for Linux (Version 15.0.0.090 Build 20140723) now available from the Intel® Registration Center.

$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.090 Build 20140723
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

$ ifort -c -gen-dep hw.F90
hw.o : \
  hw.F90

$

 

返信