# Script for building Zoltan with purify on linux workstation octopi 
# with openmpi.
# This is a 64-bit installation.

/bin/rm -r Makefile Makefile.export.zoltan OUTPUT.C OUTPUT.I OUTPUT.M config.cache config.log config.status* example/ include/ lib/ siMPI/ src/

set path=(/usr/local/bin $path)
setenv PURE_CC "purify -best-effort -follow-child-processes=yes -cache-dir=/tmp/purify -chain-length=20"
setenv CC  "$PURE_CC gcc34  -Wall -Werror-implicit-function-declaration"
setenv CXX "$PURE_CC g++34  -Wall -Werror-implicit-function-declaration"
setenv CFLAGS "-m64 -g"
setenv CXXFLAGS "-m64 -g"
setenv CPPFLAGS "-m64 -g"
setenv FCFLAGS "-m64 -g"
setenv MPIINC `mpicc --showme:compile`
setenv MPILIB `mpicc --showme:link`

../configure -C \
  --prefix=/Net/local/homes/kddevin/code/zoltan_v3.2/Obj_pure \
  --enable-mpi  \
  --with-mpi-compilers=no \
  --disable-fortran \
  --with-gnumake \
  --disable-zoltan-cppdriver \
  --with-libs="$MPILIB" \
  --with-incdirs="$MPIINC" \
   |& tee OUTPUT.C
make everything |& tee OUTPUT.M
make install |& tee OUTPUT.I

#  --with-parmetis \
#  --with-parmetis-incdir="/Net/local/proj/zoltan/arch/all/src/ParMETIS3" \
#  --with-parmetis-libdir="/Net/local/proj/zoltan/arch/linux64/lib/openmpi/ParMETIS3_1" \

