# Requires (command line or in  .bashrc):
#   module load cmake
#
# cmake configuration script that works on jaguar with PGI
# This script needs to be run from a subdirectory (e.g. build-pgi)
# of the main seacism repository (reflected in the several 
# instances of # ".." below).
#
# After this executes, do:
#   make -j 8
#   cp example-drivers/simple_glide/src/sgcmake .
#  --If you get an error about missing mod files, try make multiple times.


rm ./CMakeCache.txt

echo
echo "Doing CMake Configuration step"

cmake \
  -D GLIMMER_TRILINOS_DIR=/tmp/work/imn/trilinos-11.0.4-Source/APR2013_PGI/install \
  -D GLIMMER_NETCDF_DIR=$NETCDF_DIR \
  -D GLIMMER_FMAIN="/opt/pgi/12.9.0/linux86-64/12.9/lib/f90main.o" \
  -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
 ..

# Note: last argument above  ".."  is path to top seacism directory 
 
# If you dont depend on  netcdff AND netcdf, but just netcdf, use this line
#   -D GLIMMER_NETCDF_LIBS="netcdf" \
#
# 1/17/2013 this the PrgEnv that both the trilinos build above and the current
# successful build and run of seacism on Titan
#Currently Loaded Modulefiles:
#  1) modules/3.2.6.6                         22) rca/1.0.0-2.0401.34092.9.59.gem
#  2) xtpe-network-gemini                     23) krca/1.0.0-2.0401.33562.3.95.gem
#  3) xtpe-interlagos                         24) dvs/0.9.0-1.0401.1327.13.34.gem
#  4) eswrap/1.0.15                           25) csa/3.0.0-1_2.0401.33458.3.110.gem
#  5) lustredu/1.2                            26) job/1.5.5-0.1_2.0401.34507.6.2.gem
#  6) DefApps                                 27) xpmem/0.1-2.0401.32557.3.12.gem
#  7) altd/1.0                                28) gni-headers/2.1-1.0401.5618.16.1.gem
#  8) torque/4.1.4                            29) dmapp/3.2.1-1.0401.5585.5.2.gem
#  9) moab/7.1.3                              30) pmi/4.0.0-1.0000.9282.69.4.gem
# 10) cray-mpich2/5.5.5                       31) ugni/4.0-1.0401.5617.15.1.gem
# 11) atp/1.5.2                               32) udreg/2.3.2-1.0401.5828.5.1.gem
# 12) xe-sysroot/4.1.20                       33) xt-libsci/11.1.01
# 13) switch/1.0-1.0401.34518.4.34.gem        34) pgi/12.9.0
# 14) shared-root/1.0-1.0401.34936.4.9.gem    35) xt-asyncpe/5.16
# 15) pdsh/2.2-1.0401.34516.3.1.gem           36) subversion/1.6.17
# 16) nodehealth/3.0-1.0401.35104.16.2.gem    37) cmake/2.8.6
# 17) lbcd/2.1-1.0401.34512.5.1.gem           38) python/2.7.2
# 18) hosts/1.0-1.0401.34511.5.34.gem         39) szip/2.1
# 19) configuration/1.0-1.0401.34510.3.3.gem  40) PrgEnv-pgi/4.1.20
# 20) ccm/2.2.0-1.0401.34937.13.25            41) hdf5/1.8.7
# 21) audit/1.0.0-1.0401.34509.4.34.gem       42) netcdf/4.1.3

