Changes: Development#

General:

  • Remove the IRIX, Solaris, SunOS 4, and IBM RS6000 floating point trap implementations and their configure checks

  • Remove the xldb debugger option

Configure/Build:

  • Add --download-cudss and --with-cudss-dir configure options to support the NVIDIA cuDSS GPU-accelerated sparse direct solver library

  • Add --download-cutest and --download-sifdecode for the CUTEst optimization testing environment and SIF problem decoder

  • Add Meson package builds, --download-meson, and --download-package-meson-arguments for additional Meson setup arguments

  • Add --download-ninja and --with-ninja-exec for the Ninja backend used by Meson package builds

  • Add --with-meson-exec to select an existing Meson executable

  • Add --with-cmake-debug-find to control whether --debug-find is passed to the CMake configure of downloaded packages; it is on by default and needs CMake 3.17 or newer

  • Add --with-sdl3 for the SDL3 and SDL3_ttf libraries used by PETSC_DRAW_SDL3; configure looks for them by default

  • Change OpenMP target offload for CUDA/HIP to require --with-openmp-target-offload instead of being enabled automatically

  • Build petsc4py, mpi4py, and slepc4py with -O0 to shorten build time; the binding code is no longer optimized

  • Fix --with-shared-libraries=1 on Microsoft Windows with Intel ifx, where Fortran code failed to link

  • Require HIP/ROCm 5.2.0 or later

  • Remove the PETSC_HAVE_CUDA_VERSION_11PLUS configure macro; all supported CUDA versions are 11.4 or later

  • Replace the prebuilt win32fe.exe used with Microsoft and Intel compilers on Microsoft Windows with a Python port that needs Cygwin python3; the win32fe_* wrapper names and options do not change. See $PETSC_DIR/lib/petsc/bin/win32fe/python/README.md for the changes from the C++ version

Sys:

  • Add PETSC_DRAW_SDL3, a PetscDraw graphics device implemented with the SDL3 and SDL3_ttf libraries, and PetscDrawOpenSDL3(); PetscDrawSetFromOptions() selects it by default when neither Microsoft Windows graphics nor X Windows is available

  • Add PETSC_TLS to declare a variable thread-local when configured with --with-threadsafety=1

  • Maintain a separate PetscStack for each thread when configured with --with-debugging=1 --with-threadsafety=1

  • Add topology-aware GPU binding using hwloc; Requires hwloc version 2.0 or later

  • Add PetscCommCreateNonempty() and PetscCommDestroyNonempty() for external libraries, such as ParMETIS and PT-SCOTCH, that require every process of their communicator to own data

  • Change PETSC_PI, PETSC_PHI, PETSC_SQRT2, PETSC_E, PETSC_MAX_REAL, PETSC_REAL_MIN, PETSC_MACHINE_EPSILON, PETSC_SQRT_MACHINE_EPSILON, and PETSC_SMALL from macros to static const PetscReal objects, constexpr in C++ so they can be used in constant expressions and device code, and likewise PETSC_MIN_REAL, PETSC_INFINITY, and PETSC_NINFINITY except in C with the Microsoft, Intel classic, and NVHPC compilers, where they remain macros

  • Change PETSC_REAL_MIN in double precision from the largest subnormal value to DBL_MIN, its documented smallest positive normalized value

  • Change PETSC_SQRT_MACHINE_EPSILON in double precision to the exactly representable 1.4901161193847656e-08, one ulp below the previous value; finite-difference step sizes change accordingly

  • Reduce the include dependencies of many public headers

  • Several public headers now include only the corresponding petsc*types.h instead of the full API header: petscdmproduct.h, petscdmredundant.h and petscspace.h no longer provide the DM API, petsctaolinesearch.h no longer provides the Tao API, petscdmda.h, petscfeceed.h and petscfvceed.h no longer provide the PetscFE/PetscFV APIs, and petsclayouthdf5.h no longer provides the IS API; code that obtained those APIs through one of these headers must now include the API header as well

  • petscsys.h no longer includes petscpkg_version.h; include it directly to use the PETSC_PKG_*_VERSION_*() macros

  • petscviewer.h, petscoptions.h, petsclog.h, petscstring.h, petsctime.h, and petscdevicetypes.h no longer include petscsys.h (just include petscsys.h instead of these individual files), and petscdstypes.h no longer provides the DMLabel API

  • PetscCitationsList is no longer declared in a public header; register citations with PetscCitationsRegister()

  • Move the PETSc memory-management API (PetscMalloc(), PetscFree(), and related routines) into the new header petscmem.h; the API remains available through petscsys.h

  • Move the PetscPreLoad* functionality into petscpreload.h

  • Remove the --with-serialize-functions configure option and the associated function-pointer serialization feature (PETSC_SERIALIZE_FUNCTIONS)

  • Remove PetscDefaultCudaStream and PetscDefaultHipStream; obtain the native stream from a concrete PetscDeviceContext with PetscDeviceContextGetStreamHandle() instead

  • Remove WaitForCUDA() and WaitForHIP(); use PetscDeviceContextSynchronize() with an explicit context for stream synchronization, or cudaDeviceSynchronize()/hipDeviceSynchronize() when synchronization of the entire device is required

  • Remove the compile-time options PETSC_PREFER_DCOPY_FOR_MEMCPY, PETSC_PREFER_COPY_FOR_MEMCPY, PETSC_PREFER_FORTRAN_FORMEMCPY, PETSC_PREFER_ZERO_FOR_MEMZERO, PETSC_PREFER_FORTRAN_FOR_MEMZERO, and PETSC_PREFER_BZERO; PetscMemcpy() now always calls memcpy() and PetscMemzero() always calls memset()

  • Replace implicit NULL contexts with PetscDeviceContextDefault in device-context and device-memory APIs to retain default-stream selection, or pass an explicit context. Add PetscDeviceContextGetDefaultContext() and petsc4py DeviceContext.getDefault() to capture the default context for the current device. The cached default contexts are now named default context N with options prefix default_context_N_, instead of null context N and null_context_N_

  • Reject None in petsc4py DeviceContext.setCurrent(), assignments to DeviceContext.current, and DeviceContext.waitFor(), and reject None entries in DeviceContext.join() lists. Use DeviceContext.getDefault() for the default-stream context; to restore a previous current context, save it with DeviceContext.getCurrent() and pass it to DeviceContext.setCurrent()

  • Add an alignment argument before the output pointer to PetscDeviceMalloc() and PetscDeviceCalloc(); pass PETSC_DECIDE to retain inferred alignment, or a positive power of two to request stronger alignment

  • Add PetscDeviceContextDelay() to queue a timed host callback for testing CUDA and HIP stream ordering

Event Logging:

  • Change the CpuToGpu Count and GpuToCpu Count columns of -log_view to 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:

  • Prefer the native CUDA/HIP PetscSF backend when available so communication follows the current device context; retain Kokkos as a fallback and as an explicit choice with -sf_backend kokkos

PF:

Vec:

PetscSection:

PetscPartitioner:

Mat:

MatCoarsen:

PC:

  • Add PCHPDDMSetScaling() to supply a diagonal scaling Vec for the deflation space set with PCHPDDMSetDeflationMat(). If the fine level is a PCASM, its default PCASMType is set to PC_ASM_WEIGHTED, in which case the scaling is forwarded accordingly

  • Change interface to PCPatchSetDiscretisationInfo() to address subspace DoFs using ISs instead of with offsets and block sizes

  • Deprecate -pc_turn_off_second_balancing in favor of -pc_nn_turn_off_second_balancing for PCNN

  • Change the PCNN options -pc_is_damp_fixed and -pc_is_set_damping_factor_floating to take a positive shift amount as their value

KSP:

SNES:

SNESLineSearch:

TS:

TAO:

TaoTerm:

PetscRegressor:

PetscDA:

DM:

DMSwarm:

DMPlex:

FE/FV:

DMNetwork:

DMStag:

DT:

Fortran: