# Requires (command line or in  .bashrc):
#   module load cmake
# 
#   module unload cmake python netcdf hdf5 
#   module swap PrgEnv-pgi PrgEnv-gnu
#   module load netcdf-hdf5parallel/4.2.0 cmake/2.8.6 python
#
# cmake configuration script that works on jaguar with GCC 
# This script needs to be run from a subdirectory (e.g. build-gnu)
# 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 .

rm ./CMakeCache.txt

echo
echo "Doing CMake Configuration step"

cmake \
  -D GLIMMER_TRILINOS_DIR=/tmp/proj/cli054/trilinos-10.12/APR2013_FAST_GNU/install \
  -D GLIMMER_NETCDF_DIR=$NETCDF_DIR \
  -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
  -D GLIMMER_Fortran_FLAGS="-ffree-line-length-none" \
  -D CISM_GNU:BOOL=ON \
 ..

# Note: last argument above  ".."  is path to top seacism directory 

# Prg Env that worked in titan 1/17/2013
#Currently Loaded Modulefiles:
#  1) modules/3.2.6.6                         22) audit/1.0.0-1.0401.34509.4.34.gem
#  2) xtpe-network-gemini                     23) rca/1.0.0-2.0401.34092.9.59.gem
#  3) xtpe-interlagos                         24) krca/1.0.0-2.0401.33562.3.95.gem
#  4) eswrap/1.0.15                           25) dvs/0.9.0-1.0401.1327.13.34.gem
#  5) lustredu/1.2                            26) csa/3.0.0-1_2.0401.33458.3.110.gem
#  6) DefApps                                 27) job/1.5.5-0.1_2.0401.34507.6.2.gem
#  7) altd/1.0                                28) xpmem/0.1-2.0401.32557.3.12.gem
#  8) torque/4.1.4                            29) gni-headers/2.1-1.0401.5618.16.1.gem
#  9) moab/7.1.3                              30) dmapp/3.2.1-1.0401.5585.5.2.gem
# 10) cray-mpich2/5.5.5                       31) pmi/4.0.0-1.0000.9282.69.4.gem
# 11) subversion/1.6.17                       32) ugni/4.0-1.0401.5617.15.1.gem
# 12) atp/1.5.2                               33) udreg/2.3.2-1.0401.5828.5.1.gem
# 13) xe-sysroot/4.1.20                       34) xt-libsci/11.1.01
# 14) switch/1.0-1.0401.34518.4.34.gem        35) gcc/4.7.2
# 15) shared-root/1.0-1.0401.34936.4.9.gem    36) xt-asyncpe/5.16
# 16) pdsh/2.2-1.0401.34516.3.1.gem           37) PrgEnv-gnu/4.1.20
# 17) nodehealth/3.0-1.0401.35104.16.2.gem    38) cmake/2.8.6
# 18) lbcd/2.1-1.0401.34512.5.1.gem           39) python/2.7.2
# 19) hosts/1.0-1.0401.34511.5.34.gem         40) hdf5-parallel/1.8.8
# 20) configuration/1.0-1.0401.34510.3.3.gem  41) netcdf-hdf5parallel/4.2.0
# 21) ccm/2.2.0-1.0401.34937.13.25


