#!/bin/bash
#
#  Ed Hill
#  tested on orion.jpl.nasa.gov (Linux orion 2.4.21-sgi230r7 #1 SMP Tue Oct 7 22:38:53 PDT 2003 ia64 unknown), 20031029
#
# adapted to meinesz.mit.edu (eaps6)
# heimbach@mit.edu

# These paths will likely change to newer versions of ifort
#ph(
#LIBS='-L/opt/intel_fc_80/lib -lmpi'
#FC=/opt/intel_fc_80/bin/ifort
FC=/opt/intel_9.0.03x/bin/ifort
LIBS='-L/opt/intel_9.0.03x/lib -lmpi'
#ph)

# the '-convert big_endian' is crucial on this platform
# -D_BYTESWAPIO doesn't work
# also switch to -DWORDLENGTH=1
# replace WORDLENGTH=1 by assume byterecl
#
DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
CPP='/lib/cpp  -traditional -P'
EXTENDED_SRC_FLAG='-132'

#ph o switching to columbia flags
#ph o use ifort options -convert big_endian -assume byterecl
#ph o add -Wl,-ldl flag to (temporarily?) resolve glibc(?) problem
#FFLAGS='-mp -132 -r8 -i4 -w95 -W0 -WB -Wl,-ldl -convert big_endian -assume byterecl'
###FFLAGS='-extend_source -O2 -tpp2 -ftz -fno-alias -fno-fnalias -convert big_endian -assume byterecl'
#
#ph o switching to v9.x compiler series
#ph o new flag "-i-static" removes all Intel-specific shared libs"
FFLAGS="$FFLAGS -mp -w95 -W0 -WB -i-static -convert big_endian -assume byterecl"
#- might want to use '-r8' for fizhi pkg:
#FFLAGS="$FFLAGS -r8"

# FOPTIM='-O3 -align'
#
#P3  FOPTIM     = ( $FOPTIM '-tpp6 -xWKM' )
#P4  FOPTIM     = ( $FOPTIM '-tpp7 -xWKM' )

