Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

-gen-dep with *.F90 files

Sergey_L_
Einsteiger
2.280Aufrufe

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 Kudos
1 Lösung
Kevin_D_Intel
Mitarbeiter
2.280Aufrufe

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.

Lösung in ursprünglichem Beitrag anzeigen

10 Antworten
Sergey_L_
Einsteiger
2.280Aufrufe

> 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
Mitarbeiter
2.280Aufrufe

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
Mitarbeiter
2.280Aufrufe

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_
Einsteiger
2.280Aufrufe

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
Mitarbeiter
2.281Aufrufe

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_
Einsteiger
2.280Aufrufe
> This changes the output for your case as follows Thanks. It helps.
Kevin_D_Intel
Mitarbeiter
2.280Aufrufe

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
Neuer Beitragender II
2.280Aufrufe

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
Mitarbeiter
2.280Aufrufe

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
Mitarbeiter
2.280Aufrufe

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

$

 

Antworten