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

Crash in _for_rtl_clean

Brian_Francis
Beginner
363 Views

Hi,

We're running a multi-threaded application that crashes following the call to for_rtl_finish but before exiting. The failure occurs in _for_rtl_clean after waking up on a WaitForSingleObject. The problem is that the _for_rtl_clean code no longer exists since it was unloaded by FreeLibrary. We thought we had fixed this problem by coding a Sleep(0) following the for_rtl_finish call, whichforced a context switch that resulted in _for_rtl_clean being called before returning from Sleep.

Running the same code on a faster computer, we now occasionally get the same old problem, even with the Sleep(0) fix.

My question is, what can I do (or what can you do) to ensure that all Fortran cleanup is completed during the call to for_rtl_finish?

Thanks,

Brian.

0 Kudos
5 Replies
Steven_L_Intel1
Employee
363 Views

This sounds like our issue DPD200110386. Does your Fortran DLL do internal READs or WRITEs? Try surrounding the READ/WRITE with calls to FOR_SET_REENTRANCY, like this:

[cpp]use ifcore
...
integer MODE
...
MODE = FOR_SET_REENTRANCY(FOR_K_REENTRANCY_ASYNCH)
WRITE(errname,'(a,i1,a,i1)') 'MkTable_LA-err-',dinputs(1),'-',dinputs(2)
MODE = FOR_SET_REENTRANCY(MODE)
[/cpp]
This bug should be fixed in the next update, scheduled for late January.

0 Kudos
Brian_Francis
Beginner
363 Views
Hi Steve,
I'm running 10.1.021. Will the update be under 10.1 or only 11?
Brian.
0 Kudos
Steven_L_Intel1
Employee
363 Views

Only 11. We did fix a similar bug earlier in 10.1. so try 10.1.029 and see if it helps.

0 Kudos
Brian_Francis
Beginner
363 Views

Only 11. We did fix a similar bug earlier in 10.1. so try 10.1.029 and see if it helps.


Thanks Steve.

Can you please paste the link to download that release. I've been puttering around the download pages and I can't figure out where to get the list of updates to 10.1.

Brian.

0 Kudos
Reply