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

IVF Run-time

drgfthomas
Beginner
613 Views

The IVF documentation has an interesting item titled:

'Handlers for the Application (Project) Types' revealed by searching for 'DllMain'

I have two questions concerning this entry:

1. Why isn't the Fortran run-time source available as is the case with VC? If it were you could tailor the default Fortran exception handler to suit your application, although you'd have to recompile the run-time I guess. What is the 'default Fortran exception handler' anyways? I'd be happy with it so long as I could customize itand feed it to the proprietry run-time via an include.

2. I've tried to override the default DllMain in an IVF DLL without success. If there a knack to doing so other than including DllMain.f90?

0 Kudos
3 Replies
Steven_L_Intel1
Employee
614 Views
Gerry,

Feel free to file a feature request with Intel Premier Support asking for a way to hook some user routine into the exception handling behavior. That's a good idea.

As for DllMain, you can't "override" ifcorert.dll's DllMain. You can supply your own in your own DLL. It does not seem proper to me to want to interfere with a DLL's use of its own DllMain.
0 Kudos
drgfthomas
Beginner
614 Views

Will do (when I figure out how to contact them, just joking). Being able to inject into the startup goes beyond exception handling; it would could facillitate an app's provision of a 'user written procedure' in the unmanaged language of their choice (C/C++ or Fortran). When IVF has COM creation you could go that route butI guess relatively few Fortraners have the requisite twisted mind to bother.

I don't disagree with your pointabout supplying aDllMain. f90. In VS 98 you can even supply a Dllmain.c(pp) to a CVF DLL. Why?, because you can.

0 Kudos
Steven_L_Intel1
Employee
614 Views
If you're having difficulty submitting issues to Premier Support., let me know. As for DllMain, you can write one of these in any language. I did a test one in Fortran but of course you can write one in C as well. But DLLMain is really to initialize things for the DLL. The Fortran exception handler is established when the Fortran main program is called - the actual entry point is through the Fortran run-time library. What we've done in the past (on VMS, anyway), is to have a facility to supply an arbitrary user-defined routine that gets called when an exception passes through the procedure frame. VMS makes it easy to offer that, Windows less so, but something should be doable.
0 Kudos
Reply