-gen-dep with *.F90 files

-gen-dep with *.F90 files

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 source files, must be preprocessed? My system is
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

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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.

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.

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.

Best Reply

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.

> This changes the output for your case as follows

Thanks. It helps.

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)

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.

-Zaak

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

 

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

$

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today