PETSc: Portable, Extensible Toolkit for Scientific Computation
The Portable, Extensible Toolkit for Scientific Computation (PETSc), is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the Message Passing Interface (MPI) standard for all message-passing communication.
To install PETSc and petsc4py (mpi4py is optional but highly recommended) use:
$ python -m pip install numpy mpi4py (or pip install numpy mpi4py) $ python -m pip install petsc petsc4py (or pip install petsc petsc4py)
You can also install the in-development versions with:
$ python -m pip install Cython numpy mpi4py $ python -m pip install --no-deps https://gitlab.com/petsc/petsc/-/archive/main/petsc-main.tar.gz
To set the MPI compilers use the environmental variables MPICC, MPICXX, MPIF90.
Provide any PETSc ./configure options using the environmental variable PETSC_CONFIGURE_OPTIONS.
Do not use the PETSc ./configure options --with-cc, --with-cxx, --with-fc, or --with-mpi-dir.
If mpi4py is installed the compilers will obtained from that installation and MPICC, MPICXX, MPIF90 will be ignored.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.