To switch on bounds checking, you need a compile override file.
/hpcx/devt/n02/n02-ncas/aosprey/famous/overrides/bounds_traceback
@fort FCOM_OPTS=-g -C -qfixed -q64 -qrealsize=8 -qintsize=8 -qsigtrap
/disk2/annette/rdata/overrides/bounds_check
@fort FCOM_OPTS=-i8 -r8 -w95 -CB -g -traceback
FAMOUS requires extra mods to pass bounds checking . These fixes have been tested with Intel and IBM compilers (with the exception of the Non-MPP mod), and do not affect the bit comparison of results.
boundsfix_vn4.5.mod
- General bounds checking fixes for all vn4.5 jobs.
INANCA1A
- Related to updating.
INITPP1A
- Ocean PP files.
FOURIE3A
- Looks OK. Routine accesses outside dimensions of dummy arrays but within bounds of actual arrays passed.
boundsfix_famous.mod
- Those specific to FAMOUS.
PPHEAD1A
- Poss the result of using only 11 levels.
STZONM1A
- Zonal meaning. Used by stash.
boundsfix_nonmpp.mod
- Fixes for non-MPP version. Not tested.
CNVSTOP
DYNDIA1A
These mods have been extracted from coupled_bugs4
, which contains other fixes (related to specific STASH set ups) that we have not looked at.
Without looking in depth, most of the fixes seem OK. The FFT routines however are old and widely used code and so warrant further investigation.
Tested FAMOUS with bounds checking on, and all necessary fixes except FOURIE3A
included. Added PRINT
statements to FOURIER
to see size, shape etc of arguments passed to FTRANS
.
The routine FOURIER
passes array arguments to FTRANS
in the old fortran 77 way, by passing the starting array element only. The compiler complains because the dummy array in FTRANS
is dimensioned to N
but the routine accesses beyond this, which presumably picks out the correct element of the actual array in FOURIER
. I thought that the compiler ought to only allow access to the dimensions of the dummy array although it may make sense in terms of the actual array, however it seems to work here (perhaps because of the f77 style scalar array argument).