xref: /petsc/doc/install/index.md (revision 9b92b1d3a7bbc5a081edc9021bfd15a36804dd1c)
1*9b92b1d3SBarry Smith(doc_install)=
2*9b92b1d3SBarry Smith
3*9b92b1d3SBarry Smith# Install
4*9b92b1d3SBarry Smith
5*9b92b1d3SBarry Smith:::{note}
6*9b92b1d3SBarry SmithPETSc is available from multiple package managers.
7*9b92b1d3SBarry SmithDepending on your exact needs (for example limited use of {any}`external packages <doc_externalsoftware>`) they are possibly the easiest way for
8*9b92b1d3SBarry Smithyou to install PETSc.
9*9b92b1d3SBarry SmithAlways verify that the package manager is providing a recent enough release of PETSc with support for the external packages you need.
10*9b92b1d3SBarry SmithSome package managers provide separate packages for the complex number installation of PETSc.
11*9b92b1d3SBarry Smith
12*9b92b1d3SBarry Smith- Archlinux <https://aur.archlinux.org/packages/petsc>
13*9b92b1d3SBarry Smith- Conda: <https://anaconda.org/conda-forge/petsc>
14*9b92b1d3SBarry Smith  : `conda install -c conda-forge petsc`
15*9b92b1d3SBarry Smith- Debian: <https://packages.debian.org/petsc-dev>
16*9b92b1d3SBarry Smith  : `sudo apt install petsc-dev`
17*9b92b1d3SBarry Smith- Fedora: <https://packages.fedoraproject.org/pkgs/petsc/petsc>
18*9b92b1d3SBarry Smith  : `sudo yum install petsc-mpich-devel`
19*9b92b1d3SBarry Smith- Homebrew: <https://formulae.brew.sh/formula/petsc>
20*9b92b1d3SBarry Smith  : `brew install petsc`
21*9b92b1d3SBarry Smith- MacPorts: <https://ports.macports.org/port/petsc>
22*9b92b1d3SBarry Smith  : `sudo port install petsc`
23*9b92b1d3SBarry Smith- MSYS2 (Windows) <https://packages.msys2.org/package/mingw-w64-x86_64-petsc>
24*9b92b1d3SBarry Smith- openSUSE <https://software.opensuse.org/package/petsc>
25*9b92b1d3SBarry Smith- Python: <https://pypi.org/project/petsc>
26*9b92b1d3SBarry Smith  : `python -m pip install mpi4py petsc petsc4py`
27*9b92b1d3SBarry Smith- Slackware: <https://slackbuilds.org/repository/15.0/academic/petsc/?search=petsc>
28*9b92b1d3SBarry Smith- Spack: <https://spack.io>
29*9b92b1d3SBarry Smith  : - debug install - `spack install petsc +debug`
30*9b92b1d3SBarry Smith    - optimized install -`spack install petsc cflags='-g -O3 -march=native -mtune=native' fflags='-g -O3 -march=native -mtune=native'  cxxflags='-g -O3 -march=native -mtune=native'`
31*9b92b1d3SBarry Smith    - install with some external packages - `spack install petsc +superlu-dist +metis +hypre +hdf5`
32*9b92b1d3SBarry Smith    - list available variants (configurations) - `spack info petsc`
33*9b92b1d3SBarry Smith- Ubuntu: <https://packages.ubuntu.com/petsc-dev>
34*9b92b1d3SBarry Smith  : `sudo apt install petsc-dev`
35*9b92b1d3SBarry Smith:::
36*9b92b1d3SBarry Smith
37*9b92b1d3SBarry SmithInformation and tutorials on setting up a PETSc installation.
38*9b92b1d3SBarry Smith
39*9b92b1d3SBarry Smith```{toctree}
40*9b92b1d3SBarry Smith:maxdepth: 2
41*9b92b1d3SBarry Smith
42*9b92b1d3SBarry Smithdownload
43*9b92b1d3SBarry Smithinstall_tutorial
44*9b92b1d3SBarry Smithinstall
45*9b92b1d3SBarry Smithwindows
46*9b92b1d3SBarry Smithmultibuild
47*9b92b1d3SBarry Smithexternal_software
48*9b92b1d3SBarry Smithlicense
49*9b92b1d3SBarry Smith```
50