I'm having serious problems trying to get a f90 code to run on a
Fujitsu VPP300/8 vector machine. I'm hoping someone else might
have experience of a similar problem.
The compiler is :
Fujitsu fortran90/VP Compiler Driver L00021 (feb 1 2000).
The essence of the problem is that the compiler seems to be
having problems vectorising code based upon allocatable and
dynamic arrays in certain circumstances. I have been unable to
find a way around it. The code was converted from f77. The
f77 version of this program ran without any problems at all.
The conversion to f90 left most of the original code intact.
The move to f90 was done to replace common blocks with
modules, remove the use of parameters to size arrays which are
now allocated based on sizes in input files, and to make use
of array syntax whereever possible.
I can only reproduce short snippets of code in this email but
the problems centre around 2 modules. One module declares arrays
like:
real,dimension(:,:),allocatable,save :: ourotn,ouroutn,urotn,urott
which a subroutine contained in the module allocates space for them.
The array sizes in this program are dimension(7680,31). The inner
loop length of the model is over 7680 (ie. the vector length).
The model crashes the first time it hits the following statement in
another module:
un(:) = 1.5*urotn(:,ilev)-0.5*ourotn(:,ilev)+udivn(:,ilev)
The fujitsu gives an 'illegal instruction' error. I have tried
replacing this array syntax with a f77 style do .. end do loop (as in
the original f77 code) and got the same error. The array un() is
local to the subroutine and dynamically sized.
When I introduced some padding to the arrays, I got the same error
but in a different subroutine on another statement making use of
ourotn().
I've have also tried replacing the declaration of the arrays by
explicitly sizing them:
real, dimension(7680,31), save :: etc.
This then caused the program to crash in a completely different
place with a bus error!
I've used totalview (the fuji debugger) which gives a floating
point exception instead of illegal instruction. However, the arrays
in the un() = .. statement are fine EXCEPT for elements 5125:5130
which are given as zero (and should not be). Interestingly they are
not at the end of the arrays.
Some further information. The code runs fine with vectorisation
switched off for the file containing the un() statement. The program
also runs fine with no errors on a Sun system and SGI Origin system.
I'm not expecting any answers from anyone but I've run out of ways
to try to work around it. Unfortunately it's not possible to produce
a test program easily in this case. If anyone has seen anything like
this before or can think of other things that I could try I would
be welcome. I appreciate this message doesn't go into too much detail
about the code but I didn't want to make it overly long.
Thanks
Glenn
-----------------------------------------------------------------------
Dr. Glenn Carver, Senior Research Associate Phone: +44 (1223) 336524
Centre for Atmospheric Science, Fax: +44 (1223) 336473
Cambridge University, Chemistry Dept., [log in to unmask]
Lensfield Road, Cambridge, CB2 1EW, UK www.atm.ch.cam.ac.uk/~glenn/
"Genius is one percent inspiration and ninety nine
percent perspiration" Thomas Edison.
_______________________________________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|