Changes: Development#
General:
Configure/Build:
Add
--download-cutestand--download-sifdecodefor the CUTEst optimization testing environment and SIF problem decoderAdd Meson package builds,
--download-meson, and--download-package-meson-argumentsfor additional Meson setup argumentsAdd
--download-ninjaand--with-ninja-execfor the Ninja backend used by Meson package buildsAdd
--with-meson-execto select an existing Meson executableAdd
--with-cmake-debug-findto control whether--debug-findis passed to the CMake configure of downloaded packages; it is on by default and needs CMake 3.17 or newerChange OpenMP target offload for CUDA/HIP to require
--with-openmp-target-offloadinstead of being enabled automaticallyBuild petsc4py, mpi4py, and slepc4py with
-O0to shorten build time; the binding code is no longer optimizedFix
--with-shared-libraries=1on Microsoft Windows with Intel ifx, where Fortran code failed to link
Sys:
Add
PETSC_TLSto declare a variable thread-local when configured with--with-threadsafety=1Maintain a separate
PetscStackfor each thread when configured with--with-debugging=1 --with-threadsafety=1Add topology-aware GPU binding using
hwloc; Requireshwlocversion 2.0 or laterAdd
PetscCommCreateNonempty()andPetscCommDestroyNonempty()for external libraries, such as ParMETIS and PT-SCOTCH, that require every process of their communicator to own dataChange
PETSC_PI,PETSC_PHI,PETSC_SQRT2,PETSC_E,PETSC_MAX_REAL,PETSC_REAL_MIN,PETSC_MACHINE_EPSILON,PETSC_SQRT_MACHINE_EPSILON, andPETSC_SMALLfrom macros tostatic const PetscRealobjects,constexprin C++ so they can be used in constant expressions and device code, and likewisePETSC_MIN_REAL,PETSC_INFINITY, andPETSC_NINFINITYexcept in C with the Microsoft, Intel classic, and NVHPC compilers, where they remain macrosChange
PETSC_REAL_MINin double precision from the largest subnormal value toDBL_MIN, its documented smallest positive normalized valueChange
PETSC_SQRT_MACHINE_EPSILONin double precision to the exactly representable1.4901161193847656e-08, one ulp below the previous value; finite-difference step sizes change accordinglyReduce the include dependencies of many public headers
Several public headers now include only the corresponding
petsc*types.hinstead of the full API header:petscdmproduct.h,petscdmredundant.handpetscspace.hno longer provide theDMAPI,petsctaolinesearch.hno longer provides theTaoAPI,petscdmda.h,petscfeceed.handpetscfvceed.hno longer provide thePetscFE/PetscFVAPIs, andpetsclayouthdf5.hno longer provides theISAPI; code that obtained those APIs through one of these headers must now include the API header as wellpetscsys.hno longer includespetscpkg_version.h; include it directly to use thePETSC_PKG_*_VERSION_*()macrospetscviewer.h,petscoptions.h,petsclog.h,petscstring.h,petsctime.h, andpetscdevicetypes.hno longer includepetscsys.h(just includepetscsys.hinstead of these individual files), andpetscdstypes.hno longer provides theDMLabelAPIPetscCitationsListis no longer declared in a public header; register citations withPetscCitationsRegister()Move the PETSc memory-management API (
PetscMalloc(),PetscFree(), and related routines) into the new headerpetscmem.h; the API remains available throughpetscsys.hMove the
PetscPreLoad*functionality intopetscpreload.hRemove the
--with-serialize-functionsconfigure option and the associated function-pointer serialization feature (PETSC_SERIALIZE_FUNCTIONS)
Event Logging:
Change the
CpuToGpu CountandGpuToCpu Countcolumns of-log_viewto report the maximum over the processes instead of the average, which rounded to 0 whenever the total number of copies was less than half the number of processes; the size columns remain averages
PetscViewer:
PetscDraw:
AO:
IS:
VecScatter / PetscSF:
PF:
Vec:
Add a device implementation of
VecSqrtAbs()forVECKOKKOS; previously it copied the vector to the hostChange
VecGetState()to return aVecStateand addVecStateCompare(),VecStateCompareUpdate(), andVecStateInvalidate()Make
VecStrideMin()andVecStrideMax()propagate NaNs with the smallest global NaN index, handle IEEE infinities with empty ranks, and return the same value with or without an index
PetscSection:
PetscPartitioner:
Mat:
Add device implementations of
MatNorm()withNORM_1,NORM_FROBENIUS, andNORM_INFINITYforMATAIJKOKKOS; previously all norms copied the matrix values to the hostAdd
-mat_spdto setMAT_SPDfrom the options database inMatSetFromOptions()Change
MatSetOption()to error when a symmetry-related option contradicts an already known propertyAdd support for
MatZeroRows()andMatZeroRowsColumns()with a nonzero diagonal value on aMATISwhose local matrix does not implementMatSetValues(), such asMATSHELLChange
MatSetValuesCOO()forMATAIJand its device subtypes to generate an error when the nonzero pattern has changed sinceMatSetPreallocationCOO(), for example becauseMatSetValues()inserted a new nonzero; values were previously written into wrong locations in such a sequence of eventsChange
MatAXPY()withDIFFERENT_NONZERO_PATTERNforMATSEQAIJandMATMPIAIJto add in place when the nonzeros ofXare a subset of those ofY, keeping the nonzero pattern and nonzero state ofY, as well as the options that survive assembly, such asMAT_SYMMETRY_ETERNALAdd
MatGetRowSumAbs()forMATHYPRE, on the host and the device, and device implementations ofMatGetRowSumAbs()forMATAIJCUSPARSE,MATAIJHIPSPARSE, andMATAIJKOKKOS; previously the AIJ device types copied the matrix values to the hostChange
MatSetRandom()to no longer assemble at the interface;MATOP_SETRANDOMimplementations must leave the matrix assembled with increased stateChange
MatCreateSubMatricesMPI()to return parallel submatrices of the sameMATAIJsubtype as the input matrix, for exampleMATAIJCUSPARSE, instead of alwaysMATMPIAIJAdd device support for
MATPRODUCT_AtBwith aMATMPIAIJCUSPARSE,MATMPIAIJHIPSPARSE, orMATMPIAIJKOKKOSmatrix and aMATMPIDENSECUDAorMATMPIDENSEHIPmatrix, also with-matproduct_batch_size; previously aMATMAIJproduct copied the dense matrices to the hostChange
MATPRODUCT_AtBof aMATDIAGONALmatrix and aMATDENSECUDAorMATDENSEHIPmatrix to scale the rows on the device; previously it loopedMatMultTranspose()over the columns
MatCoarsen:
PC:
Add
PCHPDDMSetScaling()to supply a diagonal scalingVecfor the deflation space set withPCHPDDMSetDeflationMat(). If the fine level is aPCASM, its defaultPCASMTypeis set toPC_ASM_WEIGHTED, in which case the scaling is forwarded accordinglyChange interface to
PCPatchSetDiscretisationInfo()to address subspace DoFs usingISs instead of with offsets and block sizes
KSP:
Add
KSPGMRESSetVectorAllocationSize()to indicate how many additional vectors are allocated each time more restart vectors are allocated for GMRES implementationsAdd
KSPCGTRNormType,KSPCGSetTRNormType(), andKSPCGGetTRNormType()to select the trust-region norm inKSPCG,KSPSTCG,KSPNASH, andKSPGLTRDeprecate
KSPCGGetNormD()in favor ofKSPCGGetTRSolutionNorm()and-ksp_cg_dtypein favor of-ksp_cg_tr_norm_typeImplement
KSPSTCGas a specialization ofKSPCG, sharing trust-region norms, feasible Euclidean initial guesses, and objective targetsAdd
-ksp_cg_radius radiusandKSPCGGetTRSolutionNorm()support toKSPCGAdd
KSPBuildSolutionFlexibleDefault()for use by flexibleKSPTypeimplementations as theirbuildsolutionoperation
SNES:
Change interface to
SNESPatchSetDiscretisationInfo()to address subspace DoFs usingISs instead of with offsets and block sizes
SNESLineSearch:
TS:
TAO:
Add support for CUTEst unconstrained problems in TAO tutorials and tests
Map
TAOSNESconvergence and divergence reasons with the publicTaoConvergedReasonFromSNES(), and addTaoSNESGetSNES()to access the underlying solver
TaoTerm:
PetscRegressor:
PetscDA:
DM:
DMSwarm:
DMPlex:
FE/FV:
DMNetwork:
DMStag:
DT:
Fortran:
PETSC_PI,PETSC_MAX_REAL,PETSC_MIN_REAL,PETSC_MACHINE_EPSILON,PETSC_SQRT_MACHINE_EPSILON,PETSC_INFINITY, andPETSC_NINFINITYare nowparameterconstants and can be used in constant expressionsAdd
PETSC_PHI,PETSC_SQRT2, andPETSC_EPETSC_SMALLis nowprotectedand cannot be modified by user code