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_
Beginner
945 Views

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 Solution
Kevin_D_Intel
Employee
945 Views

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.

View solution in original post

0 Kudos
10 Replies
Sergey_L_
Beginner
945 Views

> 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?

0 Kudos
Kevin_D_Intel
Employee
945 Views

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.

0 Kudos
Kevin_D_Intel
Employee
945 Views

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.

0 Kudos
Sergey_L_
Beginner
945 Views

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.

0 Kudos
Kevin_D_Intel
Employee
946 Views

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.

0 Kudos
Sergey_L_
Beginner
945 Views
> This changes the output for your case as follows Thanks. It helps.
0 Kudos
Kevin_D_Intel
Employee
945 Views

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)

0 Kudos
Izaak_Beekman
New Contributor II
945 Views

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.

0 Kudos
Lorri_M_Intel
Employee
945 Views

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

 

0 Kudos
Kevin_D_Intel
Employee
945 Views

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

$

 

0 Kudos
Reply