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

Mysterious run-time error IVF 9.0

hbell1
Beginner
3,063 Views

Perhaps somebody can help me in diagnosing a IVF 9 run-time error. I get a clean compile and link. Then I get a run-time error just as I call a subroutine (I know this because I wrote to a file just before the call then the first executable line of the subroutine). All the subroutine arguments are declared and defined prior to the call. I'm not sure what else I can check. Perhaps I need to update IVF or add one or more patches? Maybe there are project settings and debugging techniques that can shed more light on the problem.

Harry Bell

0 Kudos
27 Replies
Steven_L_Intel1
Employee
2,318 Views
And the complete text of this run-time error is... ? Have you tried running the program under the debugger?

Version 9 is three revisions back. 10.1 is current. I would recommend using 10.1 and enabling the "Generate routine interfaces" and "Check routine interfaces" options under Diagnostics.
0 Kudos
hbell1
Beginner
2,318 Views

The complete text of the Windows XP-level error message is "[Name of my application] Application has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something, the information you were working on might be lost. Please tell Microsoft about this problem. smiley [:-)] We have created an error report that you can send us. We will treat this report as confidential and anonymous. To see what information this error report contains click here. [...etc.]".

I tried to set all the debugging options for the project, but I can't seem to get it to return me any meaningful insight. This most likely not very helpful, so I will upgrade to IVF 10.1, re-compile with your suggested options, then report back to the forum later.

Thanks Steve!

Harry Bell

0 Kudos
Steven_L_Intel1
Employee
2,318 Views
Ok, that's Windows' response to an unhandled exception. I would have expected to see an error message in the console window or, if not a console application, a message box.
0 Kudos
jimdempseyatthecove
Honored Contributor III
2,318 Views

Harry,

There is similar a problem that I experience(d) with the Visual Studio component Devenv crapping out. Make sure you are current with the service packs on Visual Studio (as well as updating IVF to 10.1). The Devenv problem usually occurs immediately at program start but I have experienced it 3-4 seconds after program start and at random locations in the code. Couldn't figure it out, even with posting an incident with MS. The typical work around was exit VS, launch VS, rebuild, run (PIA). Or, in Debug mode perform Step into in place of Run. If Step Into gets to the startup code, then Continue gets the app running. Seems to be a dwell time relation. I do not recall this "We are sorry..." occurring if the app were launched from a command line.

Jim Dempsey

0 Kudos
Les_Neilson
Valued Contributor II
2,318 Views

Yes I get quite a lot of this type of problem, with Visual Studio 2005.
It often happens for me when stepping into a routine while debugging. VS hangs for several seconds then gives me that box about "encountering a problem do I want to send a message to Microsoft". I have never had any response from MS :-(
If I restart VS and set a breakpoint in the routine I was attempting to step into then everything works ok - until the next failure which may be the same day or several days later and mostly when stepping into somewhere else in the code.

Les

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,318 Views

Les,

The "We're sorry..." problem seems to be like the common cold. You go a long time with no problems then you get the sniffles, comes on hard and stays around for a while, then mysteriously goes away. Sometimes, if I would finish my edits, perform a Build (without F5 to debug), then wait ~15 seconds, then F5 -- ta-da! Up and running (whereas Edit/F5 would crap out).

One of the IVF updates (somewhere between 8.0 and 10.1) combined with service pack of VS (don't remember what) wouldn't work the projects right (dependencies were snafued), the "Were sorry..." still persisted though so they did a good job at preserving that feature. Wanting the dependencies working better, I deleted the project and solution files and reconstructed them (big job, ~13 projects, 800 files, 8 different configurations). To my surprise, the "We're sorry..." went out with the wash water. And stayed away for a considerably long time. Some time later, it came back, I re-did the projects and it went away again. So it would appear to be some sort of relationship within the project or solution files.

All of this nonsense may not be related to the original poster. But on a whim,deleting and reconstructing the project filesmay be an interesting experiment for him to do.

0 Kudos
Les_Neilson
Valued Contributor II
2,318 Views

Jim,

Yes VS does seem to be unstable in so many ways.
One way that I couldreproduce regularly was run devenv, open a solution, do some work, click on File Open another solution (without a close on the current solution) after about ten such opens VS would crash. I have learned to *always* close a solution before opening another one. Also I now tend to have multiple devenv's running at the same time. (For the original situation I was going through multiple solutions, making a simple project change, build, move on to the next solution)

Certainly the "switch off, switch on again" (delete and rebuild) technique is a regular recommendation when using VS :-)

Les

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,318 Views

Les,

I had spend a considerable amount of time discussing and diagnosingthis issue with MS to no avail. It is one of those things where the problem only shows itself at the customer site. Although I find it hard to believe that with the number of programmers at MS that this problem has not been reported internally.

What I was able to determine, and deductions made therefrom, but unable to convey to MS is:

When in edit session (including Build) your development environment is presented (managed) by one instances of Devenv.

When you launch the app for debugging, the edit instance of Devenv packs its state up and stows it someway/somewhere and then launches a new instance of Devenv for the purpose of debugging the application. You may notice something analogous to a screen blanking of the VS display windows. It is expected that the vertical alignment of the displayed windows to change due to adding in the Watch, Call Stack, whatever at the bottom, but horizontal distributions of the windows and panes are expected to remain the same but are not. Some other clues are apparent (which escape me now).

Additional investigation determined that Devenv was getting a "Memory Access" error, at or near 0x000000005.

My assumption is that there appears to be some sort of race condition on the cleanup of the exit/save stateof the edit session of Devenv with the launch/restore approximate state of the Debug session of Devenv.

The deduction is there are two likely candidates that deserve scrutiny:

1) The operating system is performing some sort of lazy close/delete which is interfering with the restore state for the debugger.

2) This is in combination with (further assumption) an incomplete attempt at producing a multi-threaded Devenv whereby the restore state is assumed to have completed by one thread (e.g. opening up a memory mapped file, or read a buffer, initialized data structures, etc...) and where a different threadresponsible for the debugging resumes/starts prior to the retry or error report by the thread attempting to perform the preparation, and the execution/debug control thread getstripped up executing code under the assumption that some initialization has completed. The "Memory Access error" occurs first or is reported first. Thus hiding the file open/create or the fact that the initialization thread is in a busy retry loop.

The actual problem is likely more complex (subtle) than hypothesized above and potentially good fodder for the likes of Niel Stephenson (Cryptonomicon).

I've also found that when the problem occures, if you close the solution, exit VS, launch VS, open solution, F5 you get going again. So there is something non-obvious going on behind the scenes so to speak. "Don't pay attention to that man behind the curtain" said the man behind the curtain to Dorothy. My gut feel is that some attention is required.

Jim Dempsey

0 Kudos
hbell1
Beginner
2,318 Views

Still baffled by this error message after upgrading to IVF 10.1 and patching MS Visual Studio. The error occurs just as I call a subroutine (that is, a write statement "Just before calling subroutine" works and a write statement "This is just inside the subroutine" fails); that's about all I can determine. My project is dead until this error is figured out.

Harry Bell

0 Kudos
John4
Valued Contributor I
2,318 Views
Have you installed any updates to VS2005 other than the service pack?

Most of the problems I had last year with VS2005 (e.g., the "VS needs to close" error mentioned in this thread, issues with breakpoints, etc.) are related to the Microsoft Update. My solution was to uninstall all the VS2005-related updates that were released after the service pack.

If you have VS components for Office, check those as well (i.e., MS Update tends to pull all the updates to Office, even for components you don't have installed).

And if you have add-ins with some form of ActiveX implementation (e.g., Intel's Array Visualizer), check your Internet Explorer's settings.

John.
0 Kudos
hbell1
Beginner
2,318 Views

First of all, I use Visual Studio .NET 2003 Service Pack 1 (not VS 2005) which I thought was supposed to work with Intel Visual Studio 10.1. Is VS2003 a bad product? Do I need to get VS2005?

So the VS2005 update added problems that were not there previously? How annoying!

How do you accomplish these uninstalls? Perhaps I can just start with the old CD and go from there. But I seem to have had the above unhelpful error message before I did any upgrading.

Harry

0 Kudos
TimP
Honored Contributor III
2,318 Views
There is no Intel Visual Studio. The PPE version of Visual Studio included in ifort 10.1 would not be compatible with VS2003 or 2005; if you installed it in addition to VS, you would need to remove it and possibly repair the installations you do want.
VS2003 will not support ifort for Intel64, and of course is no longer supported by Microsoft. So it may not get as thorough testing with ifort as VS2005 or even VS2008. It's definitely important to specify versions you are using, rather than letting people answer on the basis of reasonable but wrong assumptions.
0 Kudos
Steven_L_Intel1
Employee
2,318 Views
I assume that "Intel Visual Fortran" was meant instead. VS2003 is fine to use with Intel Fortran.

The compiler installation guide contains uninstall instructions.


0 Kudos
hbell1
Beginner
2,318 Views

Yes, I meant "Intel Visual Fortran 10.1" above. Sorry.

Steve,

Could you follow up on your postto this thread of 01-03-2008, 5:42 AM. That is, what are some tools to investigate such an "unhandled exception" (for which I can't currently seem to get any diagnostic information)? I turned on the debugging settings you suggested in this thread and it didn't help.

Is an upgrade (or downgrade) to my version of Visual Studio necessary?

Harry

0 Kudos
Steven_L_Intel1
Employee
2,318 Views
If it's Developer Studio that is dying on you, there's not much you can do to diagnose it. If it does this consistently, then the first thing I recommend is a complete uninstall of Fortran and VS and then a reinstall, adding any available service packs. After the uninstall, I suggest rebooting and then deleting the entire "Visual Studio.NET 2003" folder from the PC. Then reboot again and reinstall.

Another data point you can add is to boot Windows into "Safe Mode" and see if you can reproduce the problem. If the error goes away in Safe Mode, that suggests that some background program is interfering with VS. It's then a matter of trial and error to selectively disable startup applications to see which one is the culprit.

If you are using VS only for Fortran, you can certainly try uninstalling VS2003 and installing the VS2005 PPE from 10.1 if it is available to you (depending on when you last bought a support license, it may not be.)
0 Kudos
hbell1
Beginner
2,318 Views

Some good tips. I'll give these a try.

How do I install "VS2005 PPE" (Microsoft Visual Studio 2005 Premier Partner Edition)?

Harry

0 Kudos
Steven_L_Intel1
Employee
2,318 Views
You uninstall VS2003, then download w_fc_c_10.1.013.exe from the Intel Registration Center. If all you see is a file with _NOVSPPE at the end, then you will have to submit a request to Intel Premier Support to get access to VSPPE. The downloads ending in _IA32.exe, _Intel64.exe, etc., do not include VSPPE.

Once you have the correct installer, simply run it. It will install VSPPE along with the compiler.
0 Kudos
a_leonard
Novice
2,318 Views
I don't know if this is related, but we seem to have problems with Visual Studio crashing when we have used more than one for the maximum number of processors in a parallel build. Maybe we don't have our dependencies set up correctly (the solution contains 41 projects), but it may take several tries to build successfully and when it does there is no guarantee that debugging will work.

With one processor used to build it seems OK.
0 Kudos
TimP
Honored Contributor III
2,318 Views
This is a rather vague statement. Do you mean that Studio crashes when you run the application with threading enabled? If so, did you run thread checker?
0 Kudos
a_leonard
Novice
2,248 Views
I don't know if threading was enabled or disabled. When the solution was built using more than one processor, Visual Studio would crash when a breakpoint was reached. When we rebuilt with a single processor (after cleaning the solution), it worked fine. The only difference was the Visual Studio setting about number of processors to use during build.
0 Kudos
Reply