#!/bin/bash
./config/configure.py \
  --prefix="$ISSM_TIER/externalpackages/petsc/install" \
  --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
  --PETSC_ARCH=macosx-gnu \
  --with-mpi-dir="$ISSM_TIER/externalpackages/mpich2/install" \
  --with-debugging=0 \
  --with-shared-libraries=0 \
  --download-mumps=yes \
  --download-scalapack=yes \
  --download-blacs=yes \
  --download-blas=yes \
  --download-plapack=yes  \
  --download-parmetis=yes \
  --download-f-blas-lapack=yes 

  #flags not needed because we have built MPI with these options (in which case they are already there)
  #--COPTFLAGS="-march=opteron -O2 -arch x86_64" \
  #--CXXOPTFLAGS="-march=opteron -O2 -arch x86_64" \
  #--FOPTFLAGS="-march=opteron -O2 -m64" \
  #--FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -lmpich -lpmpich -lgfortran -m64"
