xref: /petsc/doc/install/download.md (revision 9b92b1d3a7bbc5a081edc9021bfd15a36804dd1c)
1*9b92b1d3SBarry Smith(doc_download)=
2*9b92b1d3SBarry Smith
3*9b92b1d3SBarry Smith# Download
4*9b92b1d3SBarry Smith
5*9b92b1d3SBarry Smith## Recommended: Obtain Release Version With Git
6*9b92b1d3SBarry Smith
7*9b92b1d3SBarry SmithUse `release` branch from PETSc git repository - it provides the latest release with additional crucial bug fixes.
8*9b92b1d3SBarry Smith
9*9b92b1d3SBarry Smith```console
10*9b92b1d3SBarry Smith$ git clone -b release https://gitlab.com/petsc/petsc.git petsc
11*9b92b1d3SBarry Smith$ git pull # obtain new release fixes (since a prior clone or pull)
12*9b92b1d3SBarry Smith```
13*9b92b1d3SBarry Smith
14*9b92b1d3SBarry SmithTo anchor to a release version (without intermediate fixes), use:
15*9b92b1d3SBarry Smith
16*9b92b1d3SBarry Smith```console
17*9b92b1d3SBarry Smith$ git checkout vMAJOR.MINOR.PATCH
18*9b92b1d3SBarry Smith```
19*9b92b1d3SBarry Smith
20*9b92b1d3SBarry SmithWe recommend users join the official PETSc {ref}`mailing lists <doc_mail>` to submit
21*9b92b1d3SBarry Smithany questions they may have directly to the development team, to be notified of new
22*9b92b1d3SBarry Smithreleases, or to simply keep up to date with the current state of the
23*9b92b1d3SBarry Smithlibrary.
24*9b92b1d3SBarry Smith
25*9b92b1d3SBarry Smith## Alternative: Obtain Release Version with Tarball
26*9b92b1d3SBarry Smith
27*9b92b1d3SBarry SmithTarball which contains only the source. Documentation available [online](https://petsc.org/release).
28*9b92b1d3SBarry Smith
29*9b92b1d3SBarry Smith- [petsc-3.22.3.tar.gz](https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.22.3.tar.gz)
30*9b92b1d3SBarry Smith
31*9b92b1d3SBarry SmithTarball which includes all documentation, recommended for offline use.
32*9b92b1d3SBarry Smith
33*9b92b1d3SBarry Smith- [petsc-with-docs-3.22.3.tar.gz](https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-with-docs-3.22.3.tar.gz)
34*9b92b1d3SBarry Smith
35*9b92b1d3SBarry SmithTarball to enable a separate installation of petsc4py.
36*9b92b1d3SBarry Smith
37*9b92b1d3SBarry Smith- [petsc4py-3.22.3.tar.gz](https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc4py-3.22.3.tar.gz)
38*9b92b1d3SBarry Smith
39*9b92b1d3SBarry SmithTo extract the sources use:
40*9b92b1d3SBarry Smith
41*9b92b1d3SBarry Smith```console
42*9b92b1d3SBarry Smith$ tar xf petsc-<version number>.tar.gz
43*9b92b1d3SBarry Smith```
44*9b92b1d3SBarry Smith
45*9b92b1d3SBarry SmithCurrent and older release tarballs are available at:
46*9b92b1d3SBarry Smith
47*9b92b1d3SBarry Smith- [Primary server](https://web.cels.anl.gov/projects/petsc/download/release-snapshots/)
48*9b92b1d3SBarry Smith
49*9b92b1d3SBarry Smith:::{Note}
50*9b92b1d3SBarry SmithOlder release tarballs of PETSc should only be used for
51*9b92b1d3SBarry Smithapplications that have not been updated to the latest release. We urge you, whenever
52*9b92b1d3SBarry Smithpossible, to upgrade to the latest version of PETSc.
53*9b92b1d3SBarry Smith:::
54*9b92b1d3SBarry Smith
55*9b92b1d3SBarry Smith## Advanced: Obtain PETSc Development Version With Git
56*9b92b1d3SBarry Smith
57*9b92b1d3SBarry SmithImprovements and new features get added to `main` branch of PETSc git repository. To obtain development sources, use:
58*9b92b1d3SBarry Smith
59*9b92b1d3SBarry Smith```console
60*9b92b1d3SBarry Smith$ git clone https://gitlab.com/petsc/petsc.git petsc
61*9b92b1d3SBarry Smith```
62*9b92b1d3SBarry Smith
63*9b92b1d3SBarry Smithor if you already have a local clone of petsc git repository
64*9b92b1d3SBarry Smith
65*9b92b1d3SBarry Smith```console
66*9b92b1d3SBarry Smith$ git checkout main
67*9b92b1d3SBarry Smith$ git pull
68*9b92b1d3SBarry Smith```
69*9b92b1d3SBarry Smith
70*9b92b1d3SBarry SmithMore details on contributing to PETSc development are at {any}`ch_contributing`. The development version of
71*9b92b1d3SBarry Smiththe documentation, which is largely the same as the release documentation is [available](https://petsc.org/main).
72*9b92b1d3SBarry Smith
73*9b92b1d3SBarry Smith(doc_releaseschedule)=
74*9b92b1d3SBarry Smith
75*9b92b1d3SBarry Smith## Release Schedule
76*9b92b1d3SBarry Smith
77*9b92b1d3SBarry SmithWe provide new releases every 6 months, and patch updates to the current release every month.
78*9b92b1d3SBarry Smith
79*9b92b1d3SBarry SmithReleases (for example: 3.20.0, 3.21.0, etc. with corresponding Git tags v3.20.0, v3.21.0, etc):
80*9b92b1d3SBarry Smith
81*9b92b1d3SBarry Smith- March (end of the month)
82*9b92b1d3SBarry Smith- September (end of the month)
83*9b92b1d3SBarry Smith
84*9b92b1d3SBarry SmithPatch updates (for example: 3.21.1, 2.21.2, etc. with corresponding Git tags v3.21.1, v3.21.2, etc)
85*9b92b1d3SBarry Smithcontain the latest release plus crucial bug fixes since that release:
86*9b92b1d3SBarry Smith
87*9b92b1d3SBarry Smith- Last week of every month (or first week on next month - if delayed)
88*9b92b1d3SBarry Smith
89*9b92b1d3SBarry SmithThe monthly updates do not contain new features or any development work since the release, they merely contain crucial
90*9b92b1d3SBarry Smithbug fixes.
91*9b92b1d3SBarry Smith
92*9b92b1d3SBarry SmithThe ordering of PETSc branches and tags, as of May 2024 is given by (each level also contains the commits below it):
93*9b92b1d3SBarry Smith
94*9b92b1d3SBarry Smith- May (features added since v3.21.0) main branch
95*9b92b1d3SBarry Smith- May (bug fixes since v3.21.1) release branch
96*9b92b1d3SBarry Smith- April end (bug fixes since v3.21.0) v3.21.1 tag and tarball
97*9b92b1d3SBarry Smith- March end (features added after v3.20.0) v3.21.0 tag and tarball
98*9b92b1d3SBarry Smith- March end (bug fixes since v3.20.5) v3.20.6 tag and tarball
99*9b92b1d3SBarry Smith- etc
100*9b92b1d3SBarry Smith- October end (bug fixes since v3.20.0) v3.20.1 tag and tarball
101*9b92b1d3SBarry Smith- September end (features added after v3.19.0) v3.20.0 tag and tarball
102*9b92b1d3SBarry Smith
103*9b92b1d3SBarry SmithAfter a new release of PETSc, the old version no longer gets patch updates. I.e., when 3.22.0 is released, bug fixes
104*9b92b1d3SBarry Smithwill go to 3.22.x - and petsc-3.21, petsc-3.20, etc., will not get any additional patch updates.
105*9b92b1d3SBarry Smith
106*9b92b1d3SBarry SmithPETSc does not follow **Semantic Versioning**, {cite}`semver-webpage`, rather it follows:
107*9b92b1d3SBarry Smith
108*9b92b1d3SBarry Smith- MAJOR version, a major reorganization. Unlikely to change in foreseeable future.
109*9b92b1d3SBarry Smith- MINOR version, with new functionality and likely small API changes; most changes are backward compatible with deprecation. On a 6 month cycle.
110*9b92b1d3SBarry Smith- PATCH version, with bug fixes - and minor functionality updates preserving the current API. On a monthly cycle.
111*9b92b1d3SBarry Smith
112*9b92b1d3SBarry SmithPETSc provides tools to allow you to stipulate what versions of PETSc it works with at configure time, compile time, or runtime of your package, see
113*9b92b1d3SBarry Smith{any}`ch_versionchecking`.
114*9b92b1d3SBarry Smith
115*9b92b1d3SBarry Smith```{rubric} References
116*9b92b1d3SBarry Smith```
117*9b92b1d3SBarry Smith
118*9b92b1d3SBarry Smith```{bibliography} /petsc.bib
119*9b92b1d3SBarry Smith:filter: docname in docnames
120*9b92b1d3SBarry Smith```
121