File: development.md.txt

package info (click to toggle)
petsc 3.22.5%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516,740 kB
  • sloc: ansic: 814,333; cpp: 50,948; python: 37,416; f90: 17,187; javascript: 3,493; makefile: 3,198; sh: 1,502; xml: 619; objc: 445; java: 13; csh: 1
file content (37 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (2)
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
(development)=

# PETSc Development Environment

In the course of developing PETSc, you may find the following useful in setting up your
build and development environment.

## Influential `configure` flags

- `--with-strict-petscerrorcode`:

  This makes `PetscErrorCode` non-discardable (see `PETSC_NODISCARD`) in order to
  catch instances of missing `PetscCall()` and friends. For this reason it is *highly
  encouraged* that you `configure` with this option. CI will already have it enabled,
  doing so locally will save you the pain of re-running it.

  For the vast majority of cases (this includes C++ constructors/destructors!), you must
  fix discarded `PetscErrorCode` warnings by wrapping your call in the appropriate
  `PetscCall()` variant. If you are choosing to intentionally silence the warnings by
  ignoring the return code you may do so in the following way:

  ```
  PetscErrorCode ierr;

  ierr = SomePetscFunction(); // OK, capturing result
  (void)ierr; // to silence set-but-not-used warnings
  ```

## Editor Integrations

### Emacs

TODO

### Vim

TODO