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

No stack dump in Fortran code called from C++

Adrian_F_1
Principiante
2.497 Vistas

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 Respuestas
mecej4
Colaborador Distinguido III
2.497 Vistas
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.
Adrian_F_1
Principiante
2.497 Vistas

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.

Responder