2008/6/8

How to install or setup PETSc

Environment: mpich-1.2.7p1 (/usr/opt/mpich)
Intel MKL on Windows or Linux (/usr/opt/int/mkl)
Assume I had install MPICH and BLAS & LAPACK.
Therefore, if you want to install single computer PETSc without MPICH
  1. PETSC_DIR=$PWD; export PETSC_DIR
  2. ./config/configure.py --with-cc=/opt/intel/cc/10.0.14/bin/icc --with-cxx=/opt/intel/cc/10.0.14/bin/icpc --with-fc=/opt/intel/fc/10.0.14/bin/ifort --with-blas-lapack-dir=/usr/opt/intel/mkl/10.0.1.014 --with-mpi=0
  3. make all
  4. make test
  • Install PETSc with MPICH
  1. PETSC_DIR=$PWD; export PETSC_DIR
  2. ./config/configure.py --with-blas-lapack-dir=/usr/opt/intel/mkl/10.0.1.014 --with-mpi-dir=/usr/opt/mpich --with-clanguage=cxx --with-cxx=/usr/opt/mpich/bin/mpicxx
  3. make
  4. make test



BLAS/LAPACK: these packages provide some basic numeric kernels used by PETSc.
  • /usr/lib/libblas.a,liblapack.a
  • Intel MKL on Windows or Linux
  • sunperf on solaris
  • VecLib on Macs
  • IBM ESSL
  • Alternatively one can use other externalpackages installation options like the following.
    • --with-blas-lapack-lib=libsunperf.a
    • --with-blas-lib=libblas.a --with-lapack-lib=liblapack.a
    • --with-blas-lapack-dir=opt/intel/mkl72
    If using MPICH which is already installed [perhaps using myrinet/gm] then use:
    . /config/configure.py
    --with-mpi-dir=/path-to-mpich-install