Changes: 3.20#
General:
Add
PetscOptionsBegin()
,PetscOptionsEnd()
,PetscOptionsInt()
,PetscOptionsBool()
,PetscOptionsIntArray()
,PetscOptionsReal()
,PetscOptionsRealArray()
, andPetscOptionsScalar()
for FortranAdd
PetscAssertPointer()
as a replacement forPetscValidPointer()
,PetscValidCharPointer()
,PetscValidIntPointer()
,PetscValidInt64Pointer()
,PetscValidCountPointer()
,PetscValidBoolPointer()
,PetscvalidScalarPointer()
, andPetscValidRealPointer()
Convert standard header-guards in PETSc header-files to
#pragma once
. Users relying on specific preprocessor definitions to determine whether particular PETSc headers (e.g.petscdm.h
used to be guarded byPETSCDM_H
) have been included will find that this no longer works. While header-guards are technically “public” (insofar that they appear in public header-files), their name and value are considered implementation details
Configure/Build:
Add support for external-packages to prefer tarball download for regular use - as currently all packages prefer git clones. MPICH is a package using this feature. Here MPICH tarball will be downloaded for regular use. However on providing
--download-mpich-commit=main
option - configure download and builds from MPICH git repositoryAdd support for external package SLATE, optional dependency for STRUMPACK
Add support for external package ZFP, optional dependency for STRUMPACK
Add support for external package ButterflyPACK, optional dependency for STRUMPACK
Sys:
Add
PetscDeviceContextGetStreamHandle()
to return a handle to the stream the current device context is usingAdd utility functions
PetscGetCurrentCUDAStream()
andPetscGetCurrentHIPStream()
to return the GPU stream the current device context is usingAdd
PetscStrcmpAny()
to compare against multiple non-empty stringsChange arguments 4 and 5 of
PetscViewerBinaryReadAll()
andPetscViewerBinaryWriteAll()
toPetscInt64
Add
PetscIsCloseAtTolScalar()
Remove
PetscTellMyCell()
and related runtime optionRemove
PetscTextBelt()
and related runtime optionRemove deprecated
-malloc [no]
startup optionRemove deprecated
-malloc_info
startup optionRemove deprecated
-log_summary
optionRemove
PetscURLShorten()
, it has not worked since 2019Move
PetscIntStackCreate()
,PetscIntStackDestroy()
,PetscIntStackPush()
,PetscIntStackPop()
, andPetscIntStackEmpty()
declarations to public API in petsclog.hAdd
-on_error_malloc_dump
option
Event Logging:
Add
PetscLogState
interface for describing profiling events and stagesAdd
PetscLogHandler
interface that interprets the profiling events of aPetscLogState
Add
PETSCLOGHANDLERDEFAULT
implementation ofPetscLogHandler
Add
PETSCLOGHANDLERNESTED
implementation ofPetscLogHandler
Add
PETSCLOGHANDLERTRACE
implementation ofPetscLogHandler
Add
PETSCLOGHANDLERMPE
implementation ofPetscLogHandler
Add
PETSCLOGHANDLERPERFSTUBS
implementation ofPetscLogHandler
Add
PETSCLOGHANDLERLEGACY
implementation ofPetscLogHandler
Add
PetscLogPerfstubsBegin()
for log handling with PerfStubs/TAUAdd
PetscLogLegacyCallbacksBegin()
to transition old log handler callbacks to thePetscLogHandler
-based approachAdd
PetscLogHandlerStart()
to connect aPetscLogHandler
to PETSc’s global logging eventsAdd
PetscLogStageGetName()
Add
PetscLogEventGetName()
Add
PetscLogEventsPause()
andPetscLogEventsResume()
to isolate a logging event from unrelated in-process eventsAdd
PetscLogClassGetClassId()
Add
PetscLogClassIdGetName()
Deprecate
PetscLogClassPerfInfoClear()` , ``PetscLogClassPerfLogCreate()
, andPetscLogClassPerfLogDestroy()
Deprecate
PetscClassPerfLogEnsureSize()
,PetscClassRegInfoDestroy()
,PetscClassRegLogCreate()
,PetscClassRegLogDestroy()
,PetscClassRegLogGetClass()
, andPetscClassRegLogRegister()
Deprecate
PetscEventPerfInfoClear()
andPetscEventPerfInfoCopy()
Deprecate
PetscEventPerfLogActivate()
,PetscEventPerfLogActivateClass()
,PetscEventPerfLogCreate()
,PetscEventPerfLogDeactivate()
,PetscEventPerfLogDeactivateClass()
,PetscEventPerfLogDeactivatePop()
,PetscEventPerfLogDeactivatePush()
,PetscEventPerfLogDestroy()
,PetscEventPerfLogEnsureSize()
,PetscEventPerfLogGetVisible()
, andPetscEventPerfLogSetVisible()
Deprecate
PetscEventRegLogCreate()
,PetscEventRegLogDestroy()
,PetscEventRegLogGetEvent()
, andPetscEventRegLogRegister()
Deprecate
PetscStageLogCreate()
,PetscStageLogDestroy()
,PetscStageLogGetActive()
,PetscStageLogGetClassPerfLog()
,PetscStageLogGetClassRegLog()
,PetscStageLogGetEventRegLog()
,PetscStageLogGetStage()
,PetscStageLogGetVisible()
,PetscStageLogPop()
,PetscStageLogPush()
,PetscStageLogRegister()
,PetscStageLogSetActive()
,PetscStageLogSetVisible()
,PetscStageLogGetCurrent()
, andPetscStageLogGetEventPerfLog()
Deprecate
PetscLogGetStageLog()
Deprecate
PetscLogPushCurrentEvent_Internal()
Deprecate
PetscLogPopCurrentEvent_Internal()
Deprecate
PetscLogAllBegin()
Deprecate
PetscLogSet()
Add
PetscLogHandlerDump()
Add
PetscLogStageGetPerfInfo()
Add
PETSCLOGHANDLERNVTX
implementation ofPetscLogHandler
PetscViewer:
PetscDraw:
AO:
IS:
VecScatter / PetscSF:
PF:
Vec:
Add
VecErrorWeightedNorms()
to unify weighted local truncation error norms used inTS
Add CUDA/HIP implementations for
VecAbs()
,VecSqrt()
,VecExp()
,VecLog()
,VecPointwiseMax()
,VecPointwiseMaxAbs()
, andVecPointwiseMin()
Add
VecMAXPBY()
Deprecate
VecChop()
in favor ofVecFilter()
Add
VecCreateFromOptions()
PetscSection:
PetscPartitioner:
Mat:
Add support for calling
MatDuplicate()
on a matrix preallocated viaMatSetPreallocationCOO()
, and thenMatSetValuesCOO()
on the new matrixRemove
MATSOLVERSPARSEELEMENTAL
since it is no longer functionalAdd
MATSELLCUDA
. It supports fastMatMult()
,MatMultTranspose()
, andMatMultAdd()
on GPUsAdd support for
MAT_FACTOR_LU
andMAT_FACTOR_CHOLESKY
withMATSOLVERMUMPS
forMATNEST
MatGetFactor()
can now returnNULL
for some combinations of matrices and solvers types. This is to support those combinations that can only be inspected at runtime (i.e. MatNest with AIJ blocks vs MatNest with SHELL blocks)Remove
MatSetValuesDevice()
,MatCUSPARSEGetDeviceMatWrite()
,MatKokkosGetDeviceMatWrite
Add
MatDenseCUDASetPreallocation()
andMatDenseHIPSetPreallocation()
Add support for KOKKOS in
MATH2OPUS
Add
-pc_precision single
option for use withMATSOLVERSUPERLU_DIST
Add
MATDIAGONAL
which can be created withMatCreateDiagonal()
Add
MatDiagonalGetDiagonal()
,MatDiagonalRestoreDiagonal()
,MatDiagonalGetInverseDiagonal()
, andMatDiagonalRestoreInverseDiagonal()
Add support for
MatLoad()
andMatView()
to load and storeMATMPIAIJ
matrices that have more thanPETSC_INT_MAX
nonzeros, so long as each rank has fewer thanPETSC_INT_MAX
Add
MatLRCSetMats()
and register creation routine forMatLRC
Add CUDA/HIP implementation for
MatGetDiagonal()
Add a Boolean parameter to
MatEliminateZeros()
to force the removal of zero diagonal coefficientsExpose
MatComputeVariableBlockEnvelope()
in public headersAdd
MatEliminateZeros()
implementations forMatBAIJ
andMatSBAIJ
Deprecate
MatChop()
in favor ofMatFilter()
, with two additional Boolean parameters to compress the underlying storage and keep or discard near-zero diagonal coefficientsAdd
MatCreateFromOptions()
Add
MatSTRUMPACKGetReordering()
,MatSTRUMPACKSetGeometricNxyz()
,MatSTRUMPACKSetGeometricComponents()
,MatSTRUMPACKSetGeometricWidth()
,MatSTRUMPACKGetColPerm()
,MatSTRUMPACKSetGPU()
,MatSTRUMPACKGetGPU()
,MatSTRUMPACKSetCompression()
,MatSTRUMPACKGetCompression()
,MatSTRUMPACKSetCompRelTol()
,MatSTRUMPACKGetCompRelTol()
,MatSTRUMPACKSetCompAbsTol()
,MatSTRUMPACKGetCompAbsTol()
,MatSTRUMPACKSetCompMinSepSize()
,MatSTRUMPACKGetCompMinSepSize()
,MatSTRUMPACKSetCompLeafSize()
,MatSTRUMPACKGetCompLeafSize()
,MatSTRUMPACKSetCompLossyPrecision()
,MatSTRUMPACKGetCompLossyPrecision()
,MatSTRUMPACKSetCompButterflyLevels()
,MatSTRUMPACKGetCompButterflyLevels()
Add
MAT_STRUMPACK_GEOMETRIC
,MAT_STRUMPACK_AMD
,MAT_STRUMPACK_MMD
,MAT_STRUMPACK_AND
,MAT_STRUMPACK_MLF
,MAT_STRUMPACK_SPECTRAL
toMatSTRUMPACKReordering
Remove
MatSTRUMPACKSetHSSLeafSize()
,MatSTRUMPACKSetHSSMaxRank()
,MatSTRUMPACKSetHSSMinSize()
,MatSTRUMPACKSetHSSMinSepSize()
,MatSTRUMPACKSetHSSAbsTol()
,MatSTRUMPACKSetHSSRelCompTol()
,MatSTRUMPACKSetHSSRelTol()
MatCoarsen:
PC:
Add
PCMatGetApplyOperation()
andPCMatSetApplyOperation()
Add
PCReduceFailedReason()
Add
PCSetKSPNestLevel()
andPCSetKSPNestLevel()
Refactor
PCMPI
to be a private system used automatically when-mpi_linear_solver_server
is used. TheKSP
andPC
objects that solve the system now inherit any prefix provided initially withKSPSetPrefix()
and do not require the previously requiredmpi_
prefixAdd option
-fieldsplit_1_pc_hpddm_schur_precondition
to usePCHPDDM
on the Schur complements fromPCFIELDSPLIT
Add
PCGAMGSetAggressiveSquareGraph()
to use square graph method for aggressive coarsening that was the previous default coarsening approach before release 3.19Add
PCGAMGSetAggressiveMISk()
to set the number of levels (k) of aggressive MIS-k coarseing (2 is very common)Add
PCGAMGSetMinDegreeOrderingMISk()
to use a minimum degree ordering for the (greedy) MIS-k algorithmChange
PCGAMGSetUseParallelCoarseGridSolve()
toPCGAMGSetParallelCoarseGridSolve()
Add
PCGAMGSetRecomputeEstEig()
to set flag to have Chebyshev recompute its eigen estimates (default set to true)
KSP:
Add
KSPSetMinimumIterations()
andKSPGetMinimumIterations()
Add
KSPSetNestLevel()
andKSPGetNestLevel()
Support
KSPSetInitialGuessNonzero()
withKSPPREONLY
andPCDISTRIBUTE
when it is called on both the outer and innerKSP
SNES:
Add a convenient, developer-level
SNESConverged()
function that runs the convergence test and updates the internal converged reasonSwap the order of monitor and convergence test. Now monitors are always called after a convergence test
Deprecate option
-snes_ms_norms
in favor of-snes_norm_schedule always
SNESLineSearch:
TS:
Remove
TSErrorWeightedNormInfinity()
,TSErrorWeightedNorm2()
,TSErrorWeightedENormInfinity()
,TSErrorWeightedENorm2()
since the same functionality can be obtained withVecErrorWeightedNorms()
Add support for time-dependent solvers with varying solution size using
TSSetResize()
Add support for Diagonally Implicit Runge-Kutta methods with the new
TSDIRK
type
TAO:
Add
TAOBNCG
,TaoBNCGGetType()
andTaoBNCGSetType()
DM/DA:
Add support for
DMDAGetElements()
for FortranAdd support for clearing named vectors with
DMClearNamedGlobalVectors()
andDMClearNamedLocalVectors()
Add
DMPrintCellIndices()
for debuggingAdd
DMUseTensorOrder()
Add
DMCeedCreate()
,DMCeedComputeGeometry()
, andDMCeedDestroy()
DMSwarm:
Add scatter mode to
DMSwarmProjectFields()
and no longer create vectorsPromote
DMSwarmDataFieldGetEntries()
,DMSwarmDataFieldRestoreEntries()
,DMSwarmDataBucketGetDMSwarmDataFieldByName()
,DMSwarmDataBucketGetDMSwarmDataFieldIdByName()
, andDMSwarmDataBucketQueryDMSwarmDataFieldByName()
to public interface
DMPlex:
Add
DMPlexTransformExtrudeGetPeriodic()
andDMPlexTransformExtrudeSetPeriodic()
Replace
DMPlexGetGhostCellStratum()
withDMPlexGetCellTypeStratum()
Add
DMPlexSetUseMatClosurePermutation()
andDMPlexGetUseMatClosurePermutation()
Add
DMPlexGetUseCeed()
,DMPlexSetUseCeed()
, andDMPlexSNESComputeResidualCEED()
FE/FV:
Add
PLEXFE_QFUNCTION
macro to create CEED QFunctions from Plex pointwise functions
DMNetwork:
Add
DMNetworkViewSetShowRanks()
,DMNetworkViewSetViewRanks()
,DMNetworkViewSetShowGlobal()
,DMNetworkViewSetShowVertices()
,DMNetworkViewSetShowNumbering()
Add
-dmnetwork_view_all_ranks
-dmnetwork_view_rank_range
-dmnetwork_view_no_vertices
-dmnetwork_view_no_numbering
for viewing DMNetworks with the Matplotlib viewerAdd
-dmnetwork_view_zoomin_vertices
-dmnetwork_view_zoomin_vertices_padding
for viewing DMNetworks with the Matplotlib viewer
DMStag:
DT:
Add
PETSCFEVECTOR
for making a finite element that is a vector of copies of another finite elementAdd
PetscFECreateVector()
Add
PETSCDUALSPACESUM
for a finite element dual basis that is the sum of other dual basesAdd
PetscDualSpaceCreateSum()
Fortran:
Add
PetscCheck()
andPetscCheckA()
for FortranChange
PETSC_HAVE_FORTRAN
toPETSC_USE_FORTRAN_BINDINGS
to indicate if PETSc is built with Fortran bindings