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

Traceback information available for processing in a program

albert
Beginner
356 Views
Dear all,

With the function tracebackqq it is possible to obtain a stack trace writen to ones output. I need to have the information not in my output but I want to use it in my program (to see from where a certain routine is called. i.e. filename and linenumber).
Is there a way to obatin this information ?

Best Regards,

Albert
0 Kudos
4 Replies
Steven_L_Intel1
Employee
356 Views
You can use an environment variable to have the output written to a file by derfining the environment variable FOR_DIAGNOSTIC_LOG_FILE to point to where you want the info written. Then you can open the file and read it.
0 Kudos
mecej4
Honored Contributor III
356 Views
It would be nice to have such information available in the documentation. I searched for the name of this variable in

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/fortran/lin/index.htm

and found nothing.
0 Kudos
albert
Beginner
356 Views
You can use an environment variable to have the output written to a file by derfining the environment variable FOR_DIAGNOSTIC_LOG_FILE to point to where you want the info written. Then you can open the file and read it.

Hi Steve,

This will, unfortunately, not work in my case:
- it is a MPI process, so it is possible that multiple processes will write to the same file (well in my case I think it is certain, I could set the environment variable which might solve this problem) .
- the routine that has to use the information is called very often (order millions of times in a couple of hours), so my processes would come to a crunching halt.

Albert
0 Kudos
Steven_L_Intel1
Employee
356 Views
The variable is not indexed in its own name, but is in the list under Environment Variables > Run-Time.
0 Kudos
Reply