#!/bin/bash
#
# on author:
# (csh,tcsh) setenv PGI /usr/local/pkg/pgi/pgi-6.1-5
# (sh,bash)  export PGI=/usr/local/pkg/pgi/pgi-6.1-5

DEFINES='-DWORDLENGTH=4'
CPP='cpp -traditional -P'

FC='/usr/local/pkg/pgi/pgi-6.1-5/linux86/6.1/bin/pgf77'
CC='/usr/local/pkg/pgi/pgi-6.1-5/linux86/6.1/bin/pgcc'
if test "x$ALWAYS_USE_F90" = x1 ; then
    FC='/usr/local/pkg/pgi/pgi-6.1-5/linux86/6.1/bin/pgf90'
else
    DEFINES="$DEFINES -DNML_EXTENDED_F77"
fi

EXTENDED_SRC_FLAG='-Mextend'
GET_FC_VERSION="-V"

# INCLUDES="-I/scratch/edhill/netcdf_for_pgi/pgi_fc3/include"
# LIBS="-L/scratch/edhill/netcdf_for_pgi/pgi_fc3/lib"

if test "x$IEEE" = x ; then
    #  No need for IEEE-754
    FFLAGS="$FFLAGS -byteswapio -Mnodclchk"
    FOPTIM='-fastsse -Mvect=cachesize:524288,transform'
else
    #  Try to follow IEEE-754
    FFLAGS="$FFLAGS -byteswapio"
    FOPTIM='-O0 -Mscalarsse -Mcache_align -Mnoflushz -Kieee'
fi
#- might want to use '-r8' for fizhi pkg:
#FFLAGS="$FFLAGS -r8"

