#!/bin/csh

#PETSc 3.2
#MPI /usr/local/intel/mpi/4.0.3.008/lib64/

./configure \
 --prefix=$ISSM_DIR \
 --with-matlab-dir=$MATLAB_DIR \
 --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
 --with-mkl-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
 --with-mpi-include="/usr/local/intel/mpi/4.0.3.008/include64/" \
 --with-mpi-lib="-L/usr/local/intel/mpi/4.0.3.008/lib64/ -lmpi -lmpiif" \
 --with-petsc-arch=$ISSM_ARCH \
 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
 --with-scalapack-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
 --with-blacs-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
 --with-blas-lapack-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
 --with-graphics-lib=/usr/lib64/libX11.so \
 --with-cxxoptflags="-O3 -xS" \
 --with-vendor=intel-discover

