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

MATLAB_PATH=$(cygpath -u $(cygpath -ms "/c/Program Files/MATLAB/R2023b"))

ISSM_CONFIG='\
	--prefix=${ISSM_DIR} \
	--enable-development \
	--enable-debugging \
	--with-numthreads=4 \
	--with-matlab-dir="${MATLAB_PATH}" \
	--with-mpi-include="${MSMPI_ROOT}/include" \
	--with-mpi-libdir="-Wl,-L${MSMPI_ROOT}/lib" \
	--with-mpi-libflags="-Wl,-lmsmpi" \
	--with-fortran-lib="-Wl,-L/c/msys64/mingw64/lib -Wl,-lgfortran" \
	--with-metis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-parmetis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-blas-lapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-scalapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/install" \
	--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install" \
	--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install" \
	--with-semic-dir="${ISSM_DIR}/externalpackages/semic/install" \
'

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

EXTERNALPACKAGES="
	msmpi		install.sh
	petsc		install-3.14-win-msys2-mingw-msmpi.sh
	triangle	install-win-msys2-mingw.sh
	m1qn3		install-win-msys2-mingw-static.sh
	semic		install.sh
	shell2junit	install.sh
"

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

# Test suites
MATLAB_TEST=1
PYTHON_TEST=0
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=4

# Number of CPUs used in the nightly runs
NUMCPUS_RUN=2

# Nightly run options
#
# See documentation in test/NightlyRun/runme.* for more information
#
# NOTE:
# - Tests 125, 126, and 129 are skipped because restart is not yet implemented 
#	for Windows (under MSYS2)
# - test701 is skipped because it uses full Stokes equations
#
MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota'),125,126,129,435,701,702,703]"
PYTHON_NROPTIONS=""
