File: contributing.rst.txt

package info (click to toggle)
petsc 3.14.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 266,472 kB
  • sloc: ansic: 680,898; python: 33,303; cpp: 16,324; makefile: 14,022; f90: 13,731; javascript: 10,713; fortran: 9,581; sh: 1,373; xml: 619; objc: 445; csh: 192; pascal: 148; java: 13
file content (105 lines) | stat: -rw-r--r-- 3,463 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
=====================
Contributing to PETSc
=====================

As you gain experience in building, using, and debugging with PETSc, you
may become able to contribute!

Before contributing code to PETSc, please read the :doc:`style`. You may also
be interested to read about :doc:`design`.

See :doc:`integration` for information on how to submit patches and pull requests to PETSc.

Once you have gained experience with developing PETSc source code, you
can become an active member of our development and push changes directly
to the petsc repository. Send mail to petsc-maint@mcs.anl.gov to
arrange it.

How-tos
=======

Some of the source code is documented to provide direct examples/templates for common
contributions, adding new implementations for solver components:

* `Add a new PC type <https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/impls/jacobi/jacobi.c.html>`__
* `Add a new KSP type <https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/cg/cg.c.html>`__
* `Add a new subclass of a matrix type (implementation inheritence) <https://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/seq/superlu/superlu.c.html>`__

Browsing Source
===============

One can browse the development repositories at the following location

 https://gitlab.com/petsc/petsc

Obtaining the development version of PETSc
==========================================

`Install Git <https://git-scm.com/downloads>`__ if it is not already installed on your machine, then obtain PETSc with the following:

.. code-block:: bash

  git clone https://gitlab.com/petsc/petsc.git
  cd petsc

PETSc can now be configured in the usual way, specified on the
`Installation page <https://www.mcs.anl.gov/petsc/documentation/installation.html>`__

To update your copy of PETSc

.. code-block:: bash

  git pull

Once updated, you will usually want to rebuild completely

.. code-block:: bash

  make reconfigure all

This is a shorthand version of

.. code-block:: bash

  ./$PETSC_ARCH/lib/petsc/conf/reconfigure-$PETSC_ARCH.py && make all

For additional help use

* ``git help`` or ``man git``
* `The Pro Git book <https://git-scm.com/book/en/>`__

If you absolutely cannot use git then you can access tarballs directly, as in :ref:`other_ways_to_obtain`.

.. _other_ways_to_obtain:

Other ways to obtain PETSc
==========================

Getting a Tarball of the git master branch of PETSc
---------------------------------------------------
Use the following URL: https://gitlab.com/petsc/petsc/get/master.tar.gz

This mode is useful if you are on a machine where you cannot install
Git or if it has a firewall blocking http downloads.

After the tarballs is obtained - do the following:

.. code-block:: bash

        tar zxf petsc-petsc-CHANGESET.tar.gz
        mv petsc-petsc-CHANGESET petsc

To update this copy of petsc, re-download the above tarball.
The URL above gets the latest changes immediately when they are pushed to the repository.

Getting the Nightly tarball of the git master branch of PETSc
-------------------------------------------------------------

The nightly tarball will be equivalent to the release
tarball - with all the documentation built. Use the following URL:

http://ftp.mcs.anl.gov/pub/petsc/petsc-master.tar.gz

To update your copy of petsc simply get a new copy of the tar file.
The tar file at the ftp site is updated once each night [around midnight
Chicago time] with the latest changes to the development version of PETSc.