Changes: 3.21#
General:
Add single precision support for using HYPRE and MFEM
Require Fortran 2003 compiler with GET_COMMAND_ARGUMENT() support for building PETSc with Fortran bindings
Configure/Build:
Add
--download-blis-use-openmp=0to forcedownload-blisto not build with OpenMP whenwith-openmpis providedAdd
PetscBLASSetNumThreads()andPetscBLASGetNumThreads()for controlling how many threads the BLAS routines useChange
win_cland similarwin32fecompiler wrappers towin32fe_clAdd build support for Intel oneAPI compilers
icxandifxon Microsoft Windows with compiler wrapperswin32fe_icxandwin32fe_ifx(only static library build withifx)Add lib/petsc/bin/maint/runjobs.py list-of-jobs script to allow submitting a subset of the jobs to the CI
Sys:
Add
PetscBenchan object class for managing benchmarks in PETScDeprecate
PetscVoidFunction,PetscVoidStarFunction, andPetscErrorCodeFunctiontypedefs in favor ofPetscVoidFnandPetscErrorCodeFnAdd
PetscOptionsBoundedReal()andPetscOptionsRangeReal()Rename PETSc stream types to
PETSC_STREAM_DEFAULT,PETSC_STREAM_NONBLOCKING,PETSC_STREAM_DEFAULT_WITH_BARRIERandPETSC_STREAM_NONBLOCKING_WITH_BARRIER. The root device context usesPETSC_STREAM_DEFAULTby default
Event Logging:
PetscViewer:
Change
PetscViewerRestoreSubViewer()to no longer need a call toPetscViewerFlush()after itIntroduce
PetscOptionsRestoreViewer()that must be called afterPetscOptionsGetViewer()andPetscOptionsGetViewers()to ensure thread safetyAdd
PetscViewerASCIIWORLDSetFileUnit()
PetscDraw:
AO:
IS:
Add
ISLocalToGlobalMappingGetNodeInfo()andISLocalToGlobalMappingRestoreNodeInfo()to access neighboring information of local indicesAdd support to load an
ISLocalToGlobalMappingviaISLocalToGlobalMappingLoad()from data previously stored usingISLocalToGlobalMappingView()Add
ISLocalToGlobalMappingGetBlockMultiLeavesSF()to share local block data
VecScatter / PetscSF:
Add MPI-4.0 persistent neighborhood collectives support. Use -sf_neighbor_persistent along with -sf_type neighbor to enable it
Add
PetscSFCreateStridedSF()to communicate strided blocks of data
PF:
Vec:
Add
VecGhostGetGhostIS()to get the ghost indices of a ghosted vectorAdd
-vec_mdot_use_gemvto letVecMDot(),VecMTDot()use BLAS2gemv()instead of custom unrolled kernel. Default is onAdd
-vec_maxpy_use_gemvto letVecMAXPY()use BLAS2gemv()instead of custom unrolled kernel. Default is offVecReplaceArray()on the first Vec obtained fromVecDuplicateVecs()with either of the two above *_use_gemv options won’t work anymore. If needed, turn them off or useVecDuplicateVec()insteadVecScale()is now a logically collective operationAdd
VecISShift()to shift a part of the vectorVecISSet()does no longer accept NULL as index setVecLoad()automatically determines whether the file was written using 32-bit or 64-bit indices, and files can read with PETSc built either way
PetscSection:
Add
PetscSectionGetBlockStarts()andPetscSectionSetBlockStarts()Add argument to
PetscSectionCreateGlobalSection()that can ignore the local section permutation
PetscPartitioner:
Add edge weights to
PetscPartitionerPartition()
Mat:
Reset
MATLMVMhistory vectors if size is changedAdd specific support for
MatMultHermitianTranspose()andMatMultHermitianTransposeAdd()inMATSHELL,MATDENSE,MATNEST, andMATSCALAPACKAdd function
MatProductGetAlgorithm()MATTRANSPOSEVIRTUAL,MATHERMITIANTRANSPOSEVIRTUAL,MATNORMAL,MATNORMALHERMITIAN, andMATCOMPOSITEnow derive fromMATSHELL. This implies a new behavior for thoseMat, as callingMatAssemblyBegin()/MatAssemblyEnd()destroys scalings and shifts forMATSHELL, but it was not previously the case for otherMatTypeAdd function
MatGetRowSumAbs()to compute vector of L1 norms of rows ([B]AIJ only)Add partial support for
MatBackwardSolve()/MatForwardSolve()withMATSOLVERMKL_PARDISOandMATSOLVERMKL_CPARDISODeprecate
MATISoptions-matis_xxx. Use-mat_is_xxxAdd support for repeated entries in the local part of the local to global map for
MATISvia the routinesMatISSetAllowRepeated()andMatISGetAllowRepeated()Add support to dump and load a matrix of
MATIStypeAdd dense representations of symmetric Broyden matrices
MATLMVMDBFGS,MATLMVMDDFP, andMATLMVMDQNAdd
MATSELLHIPand the corresponding HIP kernels for matrix-vector multiplication
MatCoarsen:
Add
MatCoarsenSetMaximumIterations()with corresponding option-mat_coarsen_max_it <4>. The number of iteration of the coarsening method. Used for the HEM coarsenerAdd
MatCoarsenSetThreshold()with corresponding option-mat_coarsen_threshold <-1>. Threshold for filtering graph for HEM. Like GAMG < 0 means no filteringChange API for several PetscCD methods used internally in
PCGAMGandMatCoarsen(eg, changePetscCDSetChuckSize()toPetscCDSetChunckSize()), removeMatargument from``PetscCDGetASMBlocks()``
PC:
Add
PCGAMGSetLowMemoryFilter()with corresponding option-pc_gamg_low_memory_threshold_filter. Use the systemMatFiltergraph/matrix filter, without a temporary copy of the graph, otherwise use method that can be fasterAdd
PCGAMGASMSetHEM()with corresponding option-pc_gamg_asm_hem_aggs N. Use ASM smoother constructed from N applications of heavy edge matchingAdd
PCLMVMSetUpdateVec()for the automatic update of the LMVM preconditioner inside a SNES solveAdd
PCGAMGSetInjectionIndex()with corresponding option-pc_gamg_injection_index i,j,k.... Inject provided indices of fine grid operator as first coarse grid restriction (sort of p-multigrid for C1 elements)Add
PC_JACOBI_ROWL1toPCJacobiTypeto use (scaled) l1 row norms for diagonal approximation with scaling of off-diagonal elementsAdd
PCJacobiSetRowl1Scale()and-pc_jacobi_rowl1_scale scaleto access new scale member of PC_Jacobi class, for new row l1 JacobiAdd
-mg_fine_...prefix alias for fine grid options to override-mg_levels_...options, like-mg_coarse_...The generated sub-matrices in
PCFIELDSPLIT,PCASM, andPCBJACOBInow retain any null space or near null space attached to them even if the non-zero structure of the outer matrix changesAdd support for multiple subdomain per MPI process in
PCBDDCAdd
PCJacobiGetDiagonal()to access the Jacobi inverted matrix diagonal and its square root variant
KSP:
SNES:
Add support for Quasi-Newton models in
SNESNEWTONTRviaSNESNewtonTRSetQNTypeAdd support for trust region norm customization in
SNESNEWTONTRviaSNESNewtonTRSetNormTypeRemove default of
KSPPREONLYandPCLUforSNESNASMsubdomain solves: forSNESASPINuse-npc_sub_ksp_type preonly -npc_sub_pc_type luAdd function typedefs
SNESInitialGuessFn,SNESFunctionFn,SNESObjectiveFn,SNESJacobianFn, andSNESNGSFnDeprecate
DMDASNESFunction,DMDASNESJacobian,DMDASNESObjective,DMDASNESFunctionVec,DMDASNESJacobianVec, andDMDASNESObjectiveVecin favor ofDMDASNESFunctionFn,DMDASNESJacobianFn,DMDASNESObjectiveFn,DMDASNESFunctionVecFn,DMDASNESJacobianVecFn, andDMDASNESObjectiveVecFn
SNESLineSearch:
Deprecate
SNESLineSearchShellSetUserFunc()andSNESLineSearchShellGetUserFunc()in favor ofSNESLineSearchShellSetApply()andSNESLineSearchShellGetApply()
TS:
Add support for custom predictor callbacks in the second-order generalized-alpha method using
TSAlpha2SetPredictor()Allow adaptivity to change time step size in first step of second-order generalized-alpha method
Add
TSSetPostEventStep()to control the first step after eventRename
TSSetPostEventIntervalStep()toTSSetPostEventSecondStep(), controlling the second step after eventRename option
-ts_event_post_eventinterval_stepto-ts_event_post_event_second_stepChange the (event) indicator functions type from
PetscScalar[]toPetscReal[]in the userindicator()callback set byTSSetEventHandler()Add
TSGetStepRollBack()to access the internal rollback flagAdd boolean flag to
TSSetResize()to control when to resize
TAO:
Deprecate
TaoCancelMonitors()(resp.-tao_cancelmonitors) in favor ofTaoMonitorCancel()(resp.-tao_monitor_cancel)Deprecate
-tao_view_gradient,-tao_view_ls_residual,-tao_view_solution, and-tao_view_stepdirectionin favor of-tao_monitor_gradient,-tao_monitor_ls_residual,-tao_monitor_solution, and-tao_monitor_stepDeprecate
-tao_draw_solution,-tao_draw_gradient, and-tao_draw_stepin favor of-tao_monitor_solution_draw,-tao_monitor_gradient_draw, and-tao_monitor_step_drawDeprecate
TaoSetMonitor()in favor ofTaoMonitorSet()Deprecate all of the provided
Taomonitor routine names in favor of the standard PETSc naming conventions
DM/DA:
Add MPI reduction inside
SNESComputeObjective_DMDA(). No need to call reduction in local callbackDeprecate
PetscSimplePointFuncin favor ofPetscSimplePointFnMove
DMPlexReorderDefaultFlagtoDMReorderDefaultFlagAdd
DMCreateSectionPermutation(),DMReorderSectionGetType(), andDMReorderSectionSetType()Add
DMReorderSectionGetDefault()andDMReorderSectionSetDefault()to allow point permutations when sections are built automaticallyChange interface to
DMCreateSectionSubDM()to add component specificationAdd
DMDAGetBoundaryType()
DMSwarm:
Add continuous
DMargument toDMSwarmProjectFields()Add
DMSwarmGetFieldInfo()Add
DMSwarmVectorGetField()
DMPlex:
Drop support for MED, i.e. remove
DMPlexCreateMedFromFile()and--with-medChange protototype of
DMPlexSetSNESLocalFEM(). Now it accepts a single context and a Boolean indicating to use the objective function callbackReplace
DMProjectCoordinates()withDMSetCoordinateDisc()Add argument to
DMPlexCreateCoordinateSpace()Add
DMPlexCoordMapand some default mapsAdd Boolean argument to
DMPlexPartitionLabelCreateSF()to sort ranksAdd
DMClearAuxiliaryVec()to clear the auxiliary dataAdd ignoreLabelHalo, sanitizeSubmesh, and ownershipTransferSF arguments to
DMPlexFilter()Change
DMPlexSetIsoperiodicFaceSF(),DMPlexGetIsoperiodicFaceSF(), andDMPlexSetIsoperiodicFaceTransform()to accept multiple values for different periodic pairings
FE/FV:
Add Jacobian type argument to
PetscFEIntegrateBdJacobian()Add
PetscFVClone()Add
PetscFVCreateDualSpace()
DMNetwork:
DMStag:
Add support for
DMLocalToLocalBegin()andDMLocalToLocalEnd()Add
DMStagSetRefinementFactor()andDMStagGetRefinementFactor()to set and get the refinement ratioAdd support for arbitrary refinement ratio and degree of freedom in interpolation and restriction
DT:
Fortran: