#  Notes on Hopper build 
# (confirmed on Oct. 15, 2012 by PHW, based on prior work by KJE)
#
# (1) before executing this script, load these modules:            
# module unload modules
# 
# module unload cmake
# module unload PrgEnv-cray PrgEnv-gnu PrgEnv-intel PrgEnv-pathscale PrgEnv-pgi
# module unload hdf5-parallel
# module unload netcdf
# module unload python
# module unload cray-shmem
# module unload cray-mpich2
# 
# module load modules/3.2.6.6
# module load cmake/2.8.7
# module load PrgEnv-pgi/4.0.46
# module load hdf5-parallel/1.8.8
# module load python/2.7.1
# module load cray-shmem/5.5.2
# module load cray-mpich2/5.5.2
# module load netcdf-hdf5parallel/4.2.0
# 
# Currently Loaded Modulefiles:
#   1) xtpe-network-gemini                   8) cmake/2.8.7                          15) gni-headers/2.1-1.0400.4351.3.1.gem  22) python/2.7.1
#   2) eswrap/1.0.10                         9) pgi/12.5.0                           16) xpmem/0.1-2.0400.31280.3.1.gem       23) cray-shmem/5.5.2
#   3) xtpe-mc12                            10) cray-libsci/11.1.00                  17) xe-sysroot/4.0.46                    24) cray-mpich2/5.5.2
#   4) torque/2.5.9                         11) udreg/2.3.1-1.0400.4264.3.1.gem      18) xt-asyncpe/5.12                      25) netcdf-hdf5parallel/4.2.0
#   5) moab/6.1.8                           12) ugni/2.3-1.0400.4374.4.88.gem        19) atp/1.5.0
#   6) altd/1.0                             13) pmi/3.0.1-1.0000.9101.2.26.gem       20) PrgEnv-pgi/4.0.46
#   7) modules/3.2.6.6                      14) dmapp/3.2.1-1.0400.4255.2.159.gem    21) hdf5-parallel/1.8.8
#
# All but netcdf-hdf5parallel was specified so as to be compatible with Trilinos build. Probably only python and netcdf are required.
#
# (2) run bootstrap 
# ./bootstrap
#
# (3) execute this configure script using:
# sh  ./configure-scripts/hopper-config
#
# (4) build the code using ...
# make

./configure \
 FC=ftn   F77=ftn   \
 CC=cc  CXX=CC \
 CXXFLAGS="-O2 --diag_suppress 554,111,611" \
 CPPFLAGS="-I/project/projectdirs/ccsm1/libgptl/libgptl-pgi -DHAVE_MPI -DMPICH_IGNORE_CXX_SEEK -DCESMTIMERS" \
 FCFLAGS="-Mfree -O2" \
 F77FLAGS="-Mfixed" \
 CFLAGS="-O2" \
 --disable-python \
 --disable-shared \
 --with-netcdf=$CRAY_NETCDF_DIR \
 EXTRA_LDLIBS="/opt/pgi/12.5.0/linux86-64/12.5/lib/f90main.o /project/projectdirs/ccsm1/libgptl/libgptl-pgi/libgptl.a "\
 --with-trilinos=/project/projectdirs/ccsm1/Trilinos/trilinos-10.12.2/hopper-pgi/install \
 --enable-mpi="yes" \
 --with-blas=-lsci_pgi \

# --prefix="$HOME/seacism"


