xref: /petsc/doc/changes/dev.md (revision 65c6dbde5b77e518f6ed8bf109ce6c9ab9061e55)
1# Changes: Development
2
3% STYLE GUIDELINES:
4% * Capitalize sentences
5% * Use imperative, e.g., Add, Improve, Change, etc.
6% * Don't use a period (.) at the end of entries
7% * If multiple sentences are needed, use a period or semicolon to divide sentences, but not at the end of the final sentence
8
9```{rubric} General:
10```
11
12- Change behavior of `-options_left` when set to `true`: it no longer triggers a call to `PetscOptionsView()`
13- Change $PETSC_DIR/lib/petsc/bin/petscfreesharedmemory to $PETSC_DIR/lib/petsc/bin/petscfreesharedmemory.sh
14
15```{rubric} Configure/Build:
16```
17
18- Make `SYCL` a `devicePackage`, i.e., builds `--with-sycl` now have `PETSC_HAVE_DEVICE` defined
19- Add the option `--with-devicelanguage` to compile `PetscDevice` code using either a C or C++ compiler
20- Add `Caliper`, an instrumentation and performance profiling library that can be used to profile `Hypre`.
21- Add typing stubs for the Python extension module `petsc4py.PETSc`.
22- Remove `--with-mumps-serial` option, rely on `--with-mpi=0`
23
24```{rubric} Sys:
25```
26
27- Add `PetscCallHYPRE()` to check HYPRE error codes and print error messages on failure
28- Add `PetscBTCountSet()` to count set bits in `PetscBT`
29- Add the option `-hypre_umpire_device_pool_size <n>` to set the Umpire device memory pool size (in MiB), which is used by HYPRE and 4 Gib by default
30
31
32```{rubric} Event Logging:
33```
34
35- Add two approaches for GPU energy monitoring:  `-log_view_gpu_energy` and `-log_view_gpu_energy_meter`
36- Add API `PetscLogGpuEnergy()`, `PetscLogGpuEnergyMeter()`, `PetscLogGpuEnergyMeterBegin()` and `PetscLogGpuEnergyMeterEnd()` for GPU energy monitoring
37
38```{rubric} PetscViewer:
39```
40
41- Change the final argument of `PetscViewerGLVisSetFields()` to `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
42
43```{rubric} PetscDraw:
44```
45
46```{rubric} AO:
47```
48
49```{rubric} IS:
50```
51
52```{rubric} VecScatter / PetscSF:
53```
54
55```{rubric} PF:
56```
57
58```{rubric} Vec:
59```
60
61```{rubric} PetscSection:
62```
63
64- Add `PetscSectionMigrateData()`, akin to `DMPlexDistributeData()`
65
66```{rubric} PetscPartitioner:
67```
68
69```{rubric} Mat:
70```
71
72- Change the `destroy()` function argument of `MatShellSetMatProductOperation()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
73- Remove `MatMissingDiagonal()`. Developers should use `MatGetDiagonalMarkers_SeqXXX()` when the functionality is needed
74- Change `MatSetOption(A, MAT_HERMITIAN, PETSC_TRUE)` for `MatSBAIJ` to no longer automatically set the option `MAT_SYMMETRIC` to `PETSC_FALSE`. It is now the duty of the user to call `MatSetOption(A, MAT_SYMMETRIC, PETSC_FALSE)` if a `MatSBAIJ` is Hermitian but not symmetric
75- Deprecate `-matmatmult_Bbn` in favor of `-matproduct_batch_size`
76
77```{rubric} MatCoarsen:
78```
79
80```{rubric} PC:
81```
82
83- Add multi-precision support for MUMPS. One could use `-pc_precision <single, double>` to set the precision to be used by MUMPS, which can be different from `PetscScalar`'s precision
84- Add support for MUMPS out-of-core facility with the option `-mat_mumps_ooc_tmpdir <dir>` and new functions `MatMumpsSetOocTmpDir()`, `MatMumpsGetOocTmpDir()`
85
86```{rubric} KSP:
87```
88
89- Remove `KSPHPDDMPrecision` in favor of `PetscPrecision`
90- Deprecate `KSPPIPEGCRSetModifyPC()`, `KSPGCRSetModifyPC()`, and `KSPFGMRESSetModifyPC()` in favor of `KSPFlexibleSetModifyPC()`
91- Deprecate `KSPFGMRESModifyPCNoChange()` and `KSPFGMRESModifyPCKSP()` in favor of `KSPFlexibleModifyPCNoChange()` and `KSPFlexibleModifyPCKSP()`
92
93```{rubric} SNES:
94```
95
96- Change the `destroy()` function argument of `SNESSetConvergenceTest()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
97- Add `SNESSetObjectiveDomainError()`
98- Change `SNES_DIVERGED_FNORM_NAN` to `SNES_DIVERGED_FUNCTION_NANORINF`
99- Add `SNES_DIVERGED_OBJECTIVE_NANORINF`
100- Add `SNES_DIVERGED_OBJECTIVE_DOMAIN`
101- Add developer functions `SNESCheckFunctionDomainError()`, `SNESLineSearchCheckFunctionDomainError()`, `SNESCheckObjectiveDomainError()`, `SNESLineSearchCheckObjectiveDomainError()`, `SNESCheckJacobianDomainError()`, and `SNESLineSearchCheckJacobianDomainError()`
102
103```{rubric} SNESLineSearch:
104```
105
106```{rubric} TS:
107```
108
109- Add `TSPseudoComputeFunction()` to get nonlinear residual while avoiding recalculation if possible
110- Remove unused `TSPseudoVerifyTimeStepDefault()`
111- Remove `TSPseudoComputeTimeStep()` and `TSPseudoVerifyTimeStep()`
112- Change the `destroy()` function argument of `TSTrajectorySetTransform()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
113- Correct option `-ts_max_reject` to `-ts_max_step_rejections`
114- Correct option `-ts_dt` to `-ts_time_step`
115
116```{rubric} TAO:
117```
118
119```{rubric} PetscRegressor:
120```
121
122```{rubric} DM/DA:
123```
124
125- Change the final argument of `DMShellSetDestroyContext()` to `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
126- Add `DMLabelGetValueISGlobal()` to get globally consistent `IS` of values in a `DMLabel`
127
128```{rubric} DMSwarm:
129```
130
131```{rubric} DMPlex:
132```
133
134- Add `DMPlexVecGetClosureAtDepth()`
135- Add an extra communicator argument to `DMPlexFilter()` to allow extracting local meshes
136- Add `DMPlexGetLETKFLocalizationMatrix` to compute localization weight matrix for LETKF
137- Change `verticesAdjSaved` parameter in `DMPlexCreateFromCell*Parallel*()` functions to be allocated by function rather than by user
138
139```{rubric} FE/FV:
140```
141
142```{rubric} DMNetwork:
143```
144
145```{rubric} DMStag:
146```
147
148```{rubric} DT:
149```
150
151```{rubric} Fortran:
152```
153
154- Replace `./configure` option `--with-mpi-f90module-visibility` with `--with-mpi-ftn-module=<mpi or mpi_f08>`
155- Add `PETSC_INT_KIND` and `PETSC_MPIINT_KIND`
156- Fortran code should now use `MPIU_Comm` instead of `MPI_Comm`, and similarly for other MPI types, see section "Fortran and MPI" in the users guide
157- Fortran interface definitions are now automatically generated for all functions that take context variable arguments, represented in the C source code with a type of `PetscCtx`, allowing the use of any Fortran derived type (or PETSc object) as the context
158- For all PETSc functions `XXXGetYYY()` that return a context variable as an argument, represented in the C source code with an argument type of `PetscCtxRt`, a macro is generated used with `Interface_XXXGetYYY(AppCtx)` which tells the Fortran compiler that a pointer to that derived type `type(AppCtx)` is returned from the Fortran version of `XXXGetYYY()`. See src/snes/tutorials/ex5f90.F90`
159
160