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

random results. Using idb to find out unbounded allocated arrays.

joseluis_ortiz
Beginner
588 Views
Hello,

I'm having a problem with one code because I have realized that some times, (not often, but quite worrying), if I run twice the same problem I get two differents results. (I have seen it because when ploting the results I got some points far away from where they where expected to be).

The code is compiler with efc 7.1 in a ZX6000 workstation (Itanium2). The program allocates arrays up to 5.4 Gb, and I guess It can be a problem of any unbounded array, but I can't find it.

My questions are:
-Is there any way using idb (or another program) to find out if I'm writing out of borders of an allocated array?
-Has anybody any other idea about the posible cause of these random results.

Thanks.

Luis A. Padrn.
IUSIANI
Las Palmas de G.C. University.
0 Kudos
3 Replies
zaleski
Beginner
588 Views
Hello

I have a similar problem. Any ideas ? I am planning to use "Valgrind", but I have not yet found the time for this project.

Cheers

Stephane
0 Kudos
TimP
Honored Contributor III
588 Views
For either ifort or idb, you are wasting your time if you don't upgrade to a version released in the last 6 months. In the recent compilers, compiling with 'ifort -C -g -traceback' and running under idb or gdb should help track down any Fortran array out of bounds situations. Valgrind may come into play in mixed language situations or cases involving libraries where you don't have source code.

Message Edited by tim18 on 02-02-2006 08:50 AM

0 Kudos
TimP
Honored Contributor III
588 Views
Checking my own advice, I found a typo in my own code, where an array size mis-match was caught only as a subscript range error:

ox(:n) = abs(x(k:n) - b)

Apparently, this caused the use of x(k:k+1-n), thus showing up my typo.
0 Kudos
Reply