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

for_stop_core

martymike
Novice
568 Views
In CVF and its precessors a routine named for_stop_core would be called if a STOP was encountered in the program, and we could overwrite that routine - and did. This technique does not seem to be working with IVF 9.1. Should it? I may be doing something incorrect in the build, but before I go off digging for such a problem I'd like to be sure it was supposed to work in the first place.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
568 Views

"Supposed to work"? No. We never documented nor supported the notion of users replacing run-time library routines. Fortran is not C.

That said, I don't spot an obvious reason why it should not work if you do it right. _for_stop_core is still the routine being used (the leading underscore being the standard name decoration and it's the same as CVF.)

0 Kudos
martymike
Novice
568 Views

Thanks Steve. Perhaps "supposed to work" was an injudicious choice of words - you've answered my question. I don't think I'm doing anything differently than I did with CVF, but it doesn't seem to be getting to that routine. I even specify CVF external calling conventions in the builds, just to eliminate one source of change. I can certainly dig harder - I just didn't want to be wasting my time if this technique just wasn't going to work anymore.

That said, is there a more standard way of capturing program termination? We track time used by users, and it's easy to find out when it starts, but a bit more problematic to find every way it can stop.

0 Kudos
Steven_L_Intel1
Employee
568 Views

Note that the RTL routines, such as for_stop_core, use the C calling convention, even in CVF.

I'm not familiar with doing termination handlers on Windows. This MSDN article looks interesting, but it seems you'd have to write a C++ wrapper around your program to use the technique.

0 Kudos
Reply