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

which include file did ifort use?

ben_barrowes
Beginner
1,053 Views

I am using make for a project and include a few directories on the command line to look for include files in.

My question is, how do I find out after the make is complete which exact file ifort used during the make process for a given source file?

Sometimes there are multiple include files with the same name in different directories, etc. I know ifort will complain if it cannot firgure it out uniquely, but how do I found out which include file was used for a specific compile of a certain file after the making is finished?

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,053 Views

I would say that's a bug. Please report it through the Service Center.

View solution in original post

0 Kudos
9 Replies
FortranFan
Honored Contributor II
1,053 Views

Welcome!  Glad you followed up on my suggestion at comp.lang.fortran and cross-posted here.

Take a look here and use /gen-dep compiler option: https://software.intel.com/en-us/fortran-compiler-18.0-developer-guide-and-reference-gen-dep

0 Kudos
ben_barrowes
Beginner
1,053 Views

Let me try that.

Thanks.

0 Kudos
ben_barrowes
Beginner
1,053 Views

Wait, after testing this, I found that gen-dep does not report the path to the include'd file.

For example, I have test1.f90 in the top level directory. Then I have sub3.f90 containing sub3 in directory t2 and sub2.f90 containing sub2 in the directory t1. The file t1/sub2.f90 include's inc3 in the directory t2. But when I compile with gen-dep, the path to inc3 is not listed:

ifort -g -o test1 test1.f90 t1/sub2.f90 t2/sub3.f90 -It2 -save-temps -gen-dep

sub1__genmod.mod : \
  test1.f90

test1.o : \
  test1.f90 inc1 inc1

sub2__genmod.mod : \
  t1/sub2.f90

sub2.o : \
  t1/sub2.f90 inc3   ******* note that path to inc3 is not here. I was hoping for t2/inc3 instead of just inc3

sub3__genmod.mod : \
  t2/sub3.f90

sub3.o : \
  t2/sub3.f90 inc3

 

So, is there any way to find the path to the include file with ifort?

 

I just tested this with gfortran and it *does* output the include file path:

 

gfortran -g test1.f90 t1/sub2.f90 t2/sub3.f90 -It2 -M -cpp

test1.o: test1.f90 inc1 inc1
sub2.o: t1/sub2.f90 t2/inc3
sub3.o: t2/sub3.f90 t2/inc3

 

Is this a bug in ifort?

0 Kudos
Steve_Lionel
Honored Contributor III
1,054 Views

I would say that's a bug. Please report it through the Service Center.

0 Kudos
andrew_4619
Honored Contributor II
1,053 Views

I noted Steves' #5  ("Please report it through the Service Center.") and I think I saw a similar comment from one of the current Intel staff a few days back. It seems  that users report issues via the user Forums do I infer that is now not the preferred route?

0 Kudos
Steve_Lionel
Honored Contributor III
1,053 Views

I heard from one of my former colleagues that customers are now being encouraged to report problems through the Service Center. I understand this - it makes it easier for the support folk to track issues and works better with the internal support processes. You're welcome to ask about possible bugs here - sometimes a discussion is worthwhile. 

0 Kudos
andrew_4619
Honored Contributor II
1,053 Views

I guess it nicely resolves  this issue of which fixes are in a new release or not. Having  invisible issues is bound to lead to better customers satisfaction on the not being able to track things problem.

0 Kudos
FortranFan
Honored Contributor II
1,053 Views

Steve Lionel (Ret.) wrote:

I heard from one of my former colleagues that customers are now being encouraged to report problems through the Service Center. I understand this - it makes it easier for the support folk to track issues and works better with the internal support processes. You're welcome to ask about possible bugs here - sometimes a discussion is worthwhile. 

Hopefully Intel team will make a "formal" announcement for the readers with relevant details on the whats and how-to's etc. on working with Service Center.

Also, it will be great if the Online Service Center items can have permissions and attributes that can be agreed upon on an incident-by-incident basis by Intel and the customer: e.g., private or public in terms of visibility to other Service Center account holders and read-only versus read/write in terms of being able to contribute to the incident resolution process.

I feel many aspects of interest to me are generic enough in terms of Fortran standard revisions or Intel compiler options or optimizations or integration with Visual Studio that I feel will be alright if any other interested customers were able to read and perhaps even contribute to   Similarly, it will be of interest to me if I could search for incidents and read back-and-forth comments and determine resolution status, provided the OP the customer who initiated the incident has provided such a permission.

It will be up to Intel, of course, if they wish to open up such aspects at the Service Center to only those customers who have active support subscription, it could even become a marketing incentive to get customers to keep renewing their subscriptions!

0 Kudos
FortranFan
Honored Contributor II
1,053 Views

ben_barrowes wrote:

Wait, after testing this, I found that gen-dep does not report the path to the include'd file ..

@ben_barrowes,

Re: "wait ..", is it then fair to assume you yourself removed the "Best Reply" flag on the first response (currently showing up as Quote #2) that you yourself must have applied at first, this perhaps on account of the limitation in the Intel facility which doesn't work fully with Fortran INCLUDE files?

0 Kudos
Reply