Topic: Profiling a Project?

Jeff,

When running the SF Profiling feature, SF saves the gmon.out file containing profiling data in the working directory.  However, I typically save input data files in another folder (Data) other than the SF project folder.  As a result of inputting data, the working directory changes to Data (as it should). Now when profiling is selected, it cannot find the gmon.out file in the SF project directory because it's been saved in the Data folder (working directory). I understand that a simple fix is just to manually move the gmon file from the Data folder to the Project folder. Now to my question. Would it be feasible to revise the profiler so that the gmon.out file is always saved to the SF project folder (so the Profiler can find it)?

Frank

Re: Profiling a Project?

Frank,

The gmon.out data file isn't saved by Simply Fortran.  Your executable is actually writing out the file once the program is finished running, populating it with the sampling data from the last run.  Unfortunately, the data will always be output to the working directory.  The actual solution would have to be modifying the compiler's profiling runtime library to remember the startup directory of your program and to write the data to that directory when the program exits. It isn't a trivial solution, though.

Jeff Armstrong
Approximatrix, LLC

Re: Profiling a Project?

Jeff,

Way too much effort for too little effect.  It's not worth your time.

Thanks for responding.

Happy New Year 2023!

Frank