From FAMOUS

Main: Bounds Checking

Bounds Checking FAMOUS

Compile Overrides

To switch on bounds checking, you need a compile override file.

        @fort    FCOM_OPTS=-g -C -qfixed -q64 -qrealsize=8 -qintsize=8 -qsigtrap 
        @fort    FCOM_OPTS=-i8 -r8 -w95 -CB -g -traceback 

Mods

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.

These mods have been extracted from coupled_bugs4, which contains other fixes (related to specific STASH set ups) that we have not looked at.

FFT Routines

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).

Retrieved from http://www.famous.ac.uk/index.php/Main/BoundsChecking
Page last modified on February 04, 2008, at 02:16 PM