This directory contains posix-compliant CMake build scripts (*-cmake.sh) and
shell agnostic build scripts (*-cmake), which are mostly intended for csh/tcsh
users. 

The posix scripts are recommended because they support out of source builds by
using the first command-line argument to set the (top-level) CISM source
directory. For example, to build in this directory, you may run the command:

source PLATFORM-COMPILER-cmake.sh

Likewise, if your CISM source is located in $CISM, you may build in a $BUILD
subdirectory by:

mkdir -p $BUILD && cd $BUILD source
$CISM/builds/PLATFORM-COMPILER/PLATFORM-COMPILER-cmake.sh $CISM

This functionality is necessary for using the build and test structure (BATS,
located in $CISM/tests/regression/), will allow you to build multiple versions
of CISM for testing, and make cleaning up the build directory easier.

Because there isn't a reasonable way to make out-of-source capable build
scripts work across both posix-compliant shells (sh, bash, zsh, etc.) and
non-compliant shells (csh, tcsh), a shell agnostic build script is also
available for csh/tcsh users. 

NOTE: If you edit one of these script, please reflect your changes in the other
script! 

WARNING: It is possible these scripts will have diverged, so if you're having
build problems, first check the differences between the two scripts. 

------------------------------------------------------------------------------

The cmake configure file cori-pgi-cmake can be used to build parallel versions of
simple_glide and simple_bisicles, 2 programs that are part of CISM (the Community
Ice Sheet Model).  The PGI compiler suite is used for this build.  

Build Instructions:

Standard Build (uses Trilinos, builds simple_glide, doesn't build simple_bisicles):

In the builds/cori-pgi directory, configure for the build using:

make clean
source cori-pgi-cmake


The configuration process should complete with a final message:
-- Build files have been written to: <my_seacism_dir>/seacism/builds/cori-pgi

The next step is to use the make program to do the build:
make -j 8

------------------------------------------------------------------------------

In the file cori-pgi-cmake, the first 4 lines of the cmake call can be modified
to configure different builds.  These lines are:
  -D NO_TRILINOS:BOOL=OFF \
  -D CISM_MPI_MODE:BOOL=ON \
  -D CISM_SERIAL_MODE:BOOL=OFF \
  -D BUILD_SIMPLE_BISICLES:BOOL=OFF \

For instance, to build simple_bisicles (and simple_glide), use:
  -D NO_TRILINOS:BOOL=ON \
  -D CISM_MPI_MODE:BOOL=ON \
  -D CISM_SERIAL_MODE:BOOL=OFF \
  -D BUILD_SIMPLE_BISICLES:BOOL=ON \

For a serial build of simple_glide, use:
  -D NO_TRILINOS:BOOL=ON \
  -D CISM_MPI_MODE:BOOL=OFF \
  -D CISM_SERIAL_MODE:BOOL=ON \
  -D BUILD_SIMPLE_BISICLES:BOOL=OFF \


Dependencies:
The packages this build depends on (Trilinos, BISICLES, and Chombo) have already
been built.  The paths to these packages can be found in cori-pgi-cmake.

Testing:

simple_glide quick test:
In seacism/tests/higher-order/dome, do:
1) type dome.py, this will give a 'simple glide not found' error
2) qsub -I -V -q interactive -l mppwidth=4
3) aprun -n 4 ...cori-config/example_drivers/simple_glide/src/simple_glide dome.9_5_2012.config


simple_bisicles quick test:
TBD.
