#--------------------#
# ISSM Configuration #
#--------------------#

MATLAB_PATH="/usr/local/MATLAB/R2019b"

ISSM_CONFIG='\
	--prefix=${ISSM_DIR} \
	--disable-static \
	--enable-development \
	--enable-debugging \
	--with-numthreads=4 \
	--with-matlab-dir=${MATLAB_PATH} \
	--with-python-dir=/usr \
	--with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \
	--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
	--with-mpi-include=${ISSM_DIR}/externalpackages/petsc/install/include \
	--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
	--with-blas-lapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-parmetis-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-hdf5-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \
	--with-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \
	--with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \
	--with-dakota-dir=${ISSM_DIR}/externalpackages/dakota/install \
	--with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \
	--with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \
	--with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \
	--with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \
'

#-------------------#
# External Packages #
#-------------------#

EXTERNALPACKAGES="
	autotools		install-linux.sh
	cmake			install.sh
	petsc			install-3.12-linux.sh
	gsl				install.sh
	boost			install-1.7-linux.sh
	dakota			install-6.2-linux.sh
	curl			install-7-linux.sh
	netcdf			install-4.7-parallel.sh
	proj			install-6.2.sh
	gdal			install-3-python.sh
	gshhg			install.sh
	gmt				install-6-linux.sh
	gmsh			install-4.sh
	triangle		install-linux.sh
	chaco			install.sh
	m1qn3			install.sh
	semic			install.sh
	shell2junit		install.sh
"

#---------#
# Testing #
#---------#

# Test suites
MATLAB_TEST=1
PYTHON_TEST=1
JAVASCRIPT_TEST=0
EXAMPLES_TEST=0

# Number of CPUs used in ISSM compilation
#
# NOTE: One is usually safer as some packages are very sensitive to parallel
#       compilation.
#
NUMCPUS_INSTALL=8

# Number of cpus used in the nightly runs
#
# NOTE: Possible problem of access to all_vertices.txt if more than 1.
#
NUMCPUS_RUN=1

# Nightly run options
#
# See documentation in test/NightlyRun/runme.* for more information.
#
# NOTE:
# - Tests 2002, 2003, 2005, 2010, 2101, and 2021 are excluded as Gmsh produces 
# different-sized meshes on macOS and Linux for 3d objects (archives are 
# generated on macOS).
# - Excluding 2006 until it can be debugged (PETSc crash)
#
MATLAB_NROPTIONS="'benchmark','slc','exclude',[2004 2005 2006 2007 2010 2011 2021 2051 2052 2053 2084 2085 2101 2424 2425]"
PYTHON_NROPTIONS="--benchmark slc --exclude 2004 2005 2006 2007 2010 2011 2021 2051 2052 2053 2084 2085 2101 2424 2425"
