#!/bin/sh # # This script will execute the example program which corresponds to # the six or seven character routine name given as an argument. # # This script "nscexample" was written 1999-06-18 by Bo Einarsson. # It is based on the NAG scripts runex and langopts. # # It is at present recommended to first give the command # # module switch mpt mpt.1.2.1.2 # # in order to get the most recent version of MPI. # # Note that this script requires the existence of the subdirectory newresults # in the present working directory, or that one will be created automatically. # F77='f90 -dp' # This is used in this script CC='cc' FFLAGS='-X m' # This is used in this script CFLAGS='-DAdd_' NOLNK='-c' CWD=`pwd` # This is used in this script UNOPT='-O 0' # flag for no optimization (used in this script) FULLOPT='-O 3,aggress' # flag for highest level of optimization LEVEL1='-O 1,aggress' # lowest intermediate level of optimization above UNOPT LEVEL2='-O 2,aggress' # lowest intermediate level of optimization above LEVEL1 # The following shell variables need to be set to point to the names # of the required libraries on your system. # NAGMPILIB should contain the pathname of the NAG Numerical MPI # library: NAGMPILIB='/usr/local/lib/libnagmpi.a' # BLACSLIBS should contain the pathnames of the ScaLAPACK (PBLAS), # NAG Parallel z chapter, ScaLAPACK (TOOLS) and BLACS libraries # on your system. The ScaLAPACK is however automatically available # on the Cray T3E. # BLACSLIBS='/usr/local/lib/libnagpblas.a /usr/local/lib/libnagmpiz.a /usr/local/lib/libnagtools.a /usr/local/lib/libnagmpiblacs.a' BLACSLIBS='/usr/local/lib/libnagmpiz.a /usr/local/lib/libnagtools.a /usr/local/lib/libnagmpiblacs.a' # FLSLIB should contain the pathname of the NAG Fortran support library that # contains the necessary support routines required. FLSLIB='/usr/local/lib/libnagfls.a' if [ ! -d newresults ] then mkdir newresults fi if [ $# -ne 1 ] then echo "runex requires one argument"; exit fi # if [ -f /appl/lib/fdcre02sm/examples/source/${1}e.f ] then echo "Running: ${1}e.f" cp /appl/lib/fdcre02sm/examples/source/${1}e.f ${1}e.f echo "$F77 $FFLAGS $UNOPT -o ${1}e.x ${1}e.f $NAGMPILIB $BLACSLIBS \ $SYSLIBS $FLSLIB" $F77 $FFLAGS $UNOPT -o ${1}e.x ${1}e.f $NAGMPILIB $BLACSLIBS \ $SYSLIBS $FLSLIB if [ -f /appl/lib/fdcre02sm/examples/data/${1}e.d ] then cp /appl/lib/fdcre02sm/examples/data/${1}e.d . fi # if [ $1 = "x02ajf" -o $1 = "x04aaf" -o $1 = "x04abf" ] then mpprun -n 1 ./${1}e.x > $CWD/newresults/${1}e.r else mpprun -n 4 ./${1}e.x > $CWD/newresults/${1}e.r fi cd $CWD rm -f ${1}e.[o] rm -f ${1}e.[dx] else echo "There is no file: ${1}e.f" fi