Strange error

Strange error

Hi,
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

dwork((nloc+1):(2*nloc))=right_hand_side
... code that uses dwork

If I change the code this way

dwork((nloc+1):(2*nloc))=right_hand_side
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.

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Brandon
Intel Developer Support

For on-line assistance: http://support.intel.com/support/performancetools
For product support information: http://www.intel.com/software/products/support
* 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

Brandon Hewitt
Technical Consulting Engineer

For 1:1 technical support: http://premier.intel.com

Software Product Support info: http://www.intel.com/software/support

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

Arturo di Gioia

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya