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

Exception Handling with Fortrain Compiler

postaquestion
Novice
1,003 Views

I was wondering if there is any support for exception handling in visual fortran compiler?

Please provide me with any documentation about the the support present in your compiler.

0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,003 Views
There's a whole chapter on exception handling in the Building Applications section of the on-disk documentation. I highly recommend reading it. That said, the support is minimal compared to what you can do in C++. You can establish a routine to be called when an exception occurs and you can get information about the exception. What you can't do directly from Fortran is "handle" the exception in any meaningful way, such as return to the caller with an error status.

What you can do is wrap Fortran code with C++ code to do that. There's an "ExceptionHandling" sample provided that you should look at.

One caveat - right now, the exception handling works only if you link statically. If you link against DLLs, then most everything you do exception-wise will be ignored. A fix for that is planned for the next update (but it isn't checked in to that stream yet, so don't count your exceptional chickens quite yet.)
0 Kudos
g_f_thomas
Beginner
1,003 Views

Hear hear. This is an excellent feature in IVF. It annoyed me when it started to act up (not work) with DLL's, obliging me to resuscitate CVF in one crucial case. Now that it's being fixed and rolled out sometime soon is reassuring, thanks IVF engineers.

Gerry

0 Kudos
nsivaram
Beginner
1,003 Views
Hai,
We used a online download version for this software. I dont think we have a disk with us. Please suggest a place where I can find this document online.

Thanks,
Siva
0 Kudos
Steven_L_Intel1
Employee
1,003 Views
The documentation is installed alongside the compiler. In Visual Studio you can get it from the Help menu. Or from Start > All Programs > Intel Software Development Tools > Intel Fortran Compiler 10.1.xxx > Intel Visual Fortrtan Documentation Index
0 Kudos
g_f_thomas
Beginner
1,003 Views

MADsblionel:

One caveat - right now, the exception handling works only if you link statically. If you link against DLLs, then most everything you do exception-wise will be ignored. A fix for that is planned for the next update (but it isn't checked in to that stream yet, so don't count your exceptional chickens quite yet.)

I tried this with 101021 but it doesn't appear to work with either static or dynamic linking. Any news onthe update?

Thanks,

Gerry

0 Kudos
Steven_L_Intel1
Employee
1,003 Views
That "next update" has not been released yet. But very, very soon...
0 Kudos
Reply