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

IFX generates unwanted PDB files

mecej4
Honored Contributor III
810 Views

The Ifort and Ifx compiler drivers on Windows provide the /nopdbfile option. This option works correctly when Ifort is used as the driver, but fails with Ifx. To see this, create a two-line hello.f90 program source, and build:

 

 

S:\ALGO\ODEPACK\HYB\npol\Morn\pol\ifxbug>ifort hello.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.7.1 Build 20221019_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:hello.exe
-subsystem:console
-incremental:no
hello.obj

 

 

With Ifx, this option does not work, because the driver gratuitously sends the MS linker the option -debug.

When I first noticed this behavior, after seeing a large number of files named "NONE" in various directories, I fretted that my computer had been conquered by a virus.

 

 

S:\ALGO\ODEPACK\HYB\npol\Morn\pol\ifxbug>ifx /nopdbfile hello.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2022.2.1 Build 20221101
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:hello.exe
-debug
-pdb:NONE
-subsystem:console
-incremental:no
hello.obj

 

 

All that the /nopdbfile option did was to cause the name of the generated PDB file to be changed from "hello.pdb" to "NONE".

0 Kudos
8 Replies
Barbara_P_Intel
Moderator
781 Views

According to the Fortran DGR (Developer Guide and Reference), /pdbfile is supported for ifort. I'm checking on the plan for implementing that in ifx.

 

0 Kudos
Barbara_P_Intel
Moderator
767 Views

Support for /[no]pdbfiles with ifx hasn't been determined yet. ifx should NOT be doing what it's doing. I filed CMPLRLLVM-42350 to get that fixed. I'll let you when a fix is available.



0 Kudos
Lorri_M_Intel
Employee
735 Views

Hi mecej4 -

               It's been a while; my fault, not yours, I haven't been on the forum as much of late.

               Anyway, yes, I can reproduce this behavior with /pdb:NONE.  Years ago that was the command to use with Microsoft Link, but I suspect it's a difference in newer versions that we hadn't noticed.

               Please note though, if you add /nopdbfile to ifort, you'll see the same thing, so at least we're consistent.

               As to why 'debug' is being set automatically, is there a chance that you have IFXCFG defined to be a configuration file?   I was unable to make this happen spontaneously without doing that.

                                Thanks -

                                                   --Lorri

   

0 Kudos
mecej4
Honored Contributor III
730 Views

Thanks for your comments, Lorri. I do have an IFX.CFG file, but its contents do not specify linker flags.

Ifort does not produce a PDB file even if /pdbfile:xyz is specified unless /debug or /Zi is also specified. In contrast, IFX's behavior (dumping PDB files everywhere without being asked or even when asked not to) is a mild nuisance.

Here are details about the contents of ifx.cfg and the environment:

 

S:\ALGO\ODEPACK\HYB\npol\Morn\pol\p2\tbed>type "c:\Program Files (x86)\Intel\oneAPI\compiler\latest\\windows\bin\ifx.cfg"
/MD /traceback /Qxhost

S:\ALGO\ODEPACK\HYB\npol\Morn\pol\p2\tbed>set ifx
Environment variable ifx not defined

 

 

0 Kudos
Lorri_M_Intel
Employee
726 Views

This gets curiouser and curiouser.

It's the /traceback in  your ifx.cfg file.

For some reason, that's enabling debug with ifx, not with ifort. 

Now, what I suspect is that traceback support with ifx requires minimal debug info to be output in the object file but that ifx is incorrectly interpreting that as link-time debug as well.

      Thanks for the additional info; I'll add it to our internal problem report and squash both things.

 

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
716 Views

>>I'll add it to our internal problem report and squash both things.

Until then, you could add a post-build (or post link event): del /S NONE.

 

Jim Dempsey

0 Kudos
mecej4
Honored Contributor III
714 Views

Thanks, Jim.

I tried something similar, by using the option /pdbfile:nul, and was rewarded with having a file called nul.pdb. Should have worn a tinfoil hat first !

0 Kudos
Barbara_P_Intel
Moderator
125 Views

Those unwanted .pdb files created by ifx are gone with the latest release 2024.1.0. It was made available last week.

Please give it a try.



0 Kudos
Reply