Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29302 Discussions

No stack dump in Fortran code called from C++

Adrian_F_1
Beginner
1,063 Views

I have a Debug Fortran DLL in which I have turned on all checking (/check:all /fpe:0).  It is called from a C++ driver program.  I am now getting no output (I was without the checks) and I suspect it's because I have an uninitialized variable, however I am not getting any stack dump or any notification of anything wrong.  Perhaps this is switched off in the C++ driver program, any idea how to switch it on?

0 Kudos
2 Replies
mecej4
Honored Contributor III
1,063 Views
Unfortunately, when uninitialized variables are at play, there is no guarantee that a stack trace or any other notification action will occur. If you can replace the C++ driver with a Fortran driver for debugging purposes, you may improve your chances of finding the problem. There are other compilers that specialize in helping you to hunt for uninitialized variables, and you may consider using them. If the unitialized variables originate in the C++ program, the preceding remark would not apply. In that case, you may need to add code to the DLL sources in order to validate the input arguments before processing them.
0 Kudos
Adrian_F_1
Beginner
1,063 Views

Thanks for the update.  The C++ driver exists and I have to work with it.  No plans to write a Fortran driver.  That said running the case in debugger does stop at the issue although this is manual, would prefer an automated solution.

0 Kudos
Reply