On Sat, 4 Nov 2000, Glenn Carver wrote:
>
> This is a followup to a posting I sent on 27/10. I was having problems getting
> a program to run in vector mode on a Fujitsu system. I had checked it on
> the fuji with no vectorisation where it would run fine. I had also run it
> on a Sun and SGI system where it also ran ok.
>
> I'm grateful to those who replied. Most suggested it was a indicative of
> writing beyond an array, which I had initially suspected. However, I'd tried
> the array bounding checking options on the Sun, SGI and Fuji compilers and
> none of them had spotted anything. This lead me to the possibility it might
> be a compiler bug with vectorising the code near to the point where the program
> crashed.
>
> [snip]
>
> I have written a small test program which illustrates what happens. It's quite
> a small code.
> ...
> I also append below the source code. The problem is caused by the assignment
> marked in subroutine write_restart. The array l_ourotn is dynamic and
> deliberately made too small for the assignment to the larger array ourotn.
> Only the pgf90 compiler spotted this. The other compilers produce code that
> runs on or crashes. I may not be using the most recent compilers on these
> systems (certainly not for the Sun compiler) but I would be interested to know
> if this error can be detected for other compilers.
That's what happens when using the NAG f90 compiler with the option -C
(switch on all runtime checks):
size of pv : 42 5
size of ourotn : 120 5
size of l_ourotn : 42 5
Rank 1 of L_OUROTN has extent 42 instead of 120
Program terminated by fatal error
Aborted
So, as you can see, it's not only the Portland compiler that
finds the bug!
Best regards,
Roland
+----------------------------------------------------------------------+
| Roland Schilling Home-Office: +49(89)32929-670 |
| Max-Planck-Institut fuer Quantenoptik Phone: +49(89)32905-265 |
| Hans-Kopfermann-Str. 1 Fax: +49(89)32905-200 |
| D-85748 Garching E-mail: [log in to unmask] |
| Germany http://www.geo600.uni-hannover.de |
+----------------------------------------------------------------------+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|