Topic: Profiler Bug

Hi Jeff, For reasons that I can't determine, the profiler starts to misreport. It will produce an empty report containing just the headers with no data/routine names. Once it happens to your project - it never recovers. When I inspect the gmon file it is mostly filled with nuls. Do you know of this behavior and how to get it working again in a project?
Regards, Pete

Re: Profiler Bug

Pete,

I wasn't aware of this behavior.  What platform are you seeing this on?  Windows?  I'll try to replicate it on my end.

Can you give some additional details?  Is your program long-running (taking a minute or two at the very least ideally)?  Do you have all optimizations disabled?

Jeff Armstrong
Approximatrix, LLC

Re: Profiler Bug

Hi Jeff,
I'm running on Windows. I'm working on an encryption program that takes ~5 seconds to complete. I do have optimizations turned on.  -pg -O3 -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -flto -mtune=znver3 -march=znver3

Re: Profiler Bug

Pete,

For profiling to work, I believe you need debugging information as well.  Simply Fortran might automatically disable debugging when optimization is enabled, so you may have to add the

-g

flag manually to your list of compiler flags.

Jeff Armstrong
Approximatrix, LLC

Re: Profiler Bug

Hi Jeff,
That didn't fix it. It's the craziest thing. The profiler might work 1 few times then after a minor code change it goes blank. The only way to get it going again is to create a new project and re-add the files to it.
My totally unscientific speculation is that it is related to me calling out to c code to access some simd instructions
Pete

Re: Profiler Bug

Pete,

Actually, looking at your flags again, you appear to be using link-time optimizations.  I believe that won't work with profiling (or debugging for that matter).

EDIT: Generally speaking, optimization will introduce a lot of problems with profiling and debugging.  Sometimes it's better to perform those tasks without optimization first.

Jeff Armstrong
Approximatrix, LLC