Strange error

Strange error

I'm an ifc 7 non commercial edition user. I incurred in a strange *address error*. The error doesn't show up if I use the -g flag, otherwise it stops the execution of my program.
These are the steps I took untill now:
1) Compiled the program with Compaq F90 for Tru64 Unix: it works even with optimizations ('-O4 -tune host').
2) I upgraded the compiler to the latest available version (Build 20030212Z) but the error still shows up.

The code is something like

... code that uses dwork

If I change the code this way

write(*,*) dwork(nloc+1)
... code that uses dwork

the error disappears. It appears that the compiler somehow doesn't finish to write dwork before using it, and adding the write statement forces the completion of the copy operation.
I run the compiler on a Gentoo box (gcc 3.2.2, glibc 2.3.1) (Pentium 4 2.0MHz). I tried the compiled, statically linked program on a Xeon 2.4MHz RedHat 8 workstation I have access to as a user, and it didn't work (same error,works in debug mode).

I could submit a bug report attaching my whole program, which is about 5000 lines of code along with instructions on how to compile it.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I get this all the time, and I feel like, wow am I stuck with this stupid print statement otherwise my code won't work. However it almost always turns out that there is some other array or file stream which isn't being handled properly and so has nothing to do with your array. Or other times it will happen if you define your array with 'allocatable,save'. Anyway, usually the problem is somewhere else besides this array so just keep debugging and don't fixate on the point where the problem crops up.

One more thing. If that right_hand_side is a function, that explains your problem. Turn it into a subroutine.

If you specify -g without specifying a -O optimization option, the compiler automatically disables optimization, so that may explain why the difference when you add -g. Try it explicitly by using -O2 vs -O0.

It's definitely worth submitting a problem report on this. Just don't expect any immediate action or response.

Intel Developer Support

For on-line assistance:
For product support information:
* Intel and Pentium are registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries
* Other names and brands may be claimed as the property of others

Ok, I'll try some more debugging just to be sure it's not my fault.
Thanks for your help.

Arturo di Gioia

Leave a Comment

Please sign in to add a comment. Not a member? Join today