1# Changes: 3.12 2 3```{rubric} General: 4``` 5 6- PetscRoundReal() has been removed, since the math routine round() 7 is not supported on all systems: perhaps use PetscCeilReal() or 8 PetscFloorReal()\<li> 9- The legacy and CMake compile systems (make all-legacy and 10 all-cmake) are removed 11- make gnumake is now make libs 12- PetscArraycmp() should be used instead of PetscMemcmp(), it takes 13 a count argument instead of a byte argument 14- PetscArraycpy() should be used instead of PetscMemcpy(), it takes 15 a count argument instead of a byte argument 16- PetscArrayzero() should be used instead of PetscMemzero(), it 17 takes a count argument instead of a byte argument 18- PetscArraymove() should be used instead of PetscMemmove(), it 19 takes a count argument instead of a byte argument 20- The ./configure options -with-gnu-compilers and 21 -with-vendor-compilers are removed 22- The ./configure option --with-avx512-kernels defaults to true now 23 so the manually optimized AVX-512 kernels are used by default 24- The order ./configure tests compilers has changed so there may be 25 a different compiler selected if you do not provide them 26- Added --with-64-bit-blas-indices that will switch to 64-bit 27 indices when using MKL libraries for BLAS/LAPACK and build 28 OpenBLAS with this support 29- Changed PETSC_DEPRECATED() to PETSC_DEPRECATED_FUNCTION() and 30 PETSC_DEPRECATED_TYPEDEF() to match naming of 31 PETSC_DEPRECATED_ENUM() and PETSC_DEPRECATED_MACRO 32- -help now causes the printing of the current value and the newly 33 set value for PetscOptionsInt(), etc 34- PetscFunctionListPrintTypes() takes an additional final argument 35 after the current value, the set value 36- PetscCalloc\*() now calls the system calloc() routine instead of 37 malloc() plus memzero() 38- -malloc is now marked as deprecated, use -malloc_debug instead 39- -malloc_log and -malloc_log_threshold are now -malloc_view and 40 -malloc_view_threshold 41- PetscMallocDebug() is now PetscMallocSetDebug() 42- PetscMallocDumpLog() is now PetscMallocView(), see also 43 PetscMallocViewSet() 44- PetscMallocSetDumpLogThreshold() and PetscMallocSetDumpLog() are 45 now PetscMallocViewSet() 46- With -malloc_test or -malloc_debug allocated memory is initialized 47 with NaN to detect use of uninitialized numerical arrays 48- PetscMallocSet() now takes three arguments instead of two 49- Moved PetscCUBLASGetHandle() to a separate header file 50 petscublas.h 51- Moved VecCUDA\*-routines from petsccuda.h into petscvec.h. Removed 52 petsccuda.h 53 54```{rubric} Configure/Build: 55``` 56 57- C++ dialect is now auto-detected (C++14 first and then C++11). One 58 can disable this check using --with-cxx-dialect=0, or force it to 59 only check for C++11 using --with-cxx-dialect=C++11 60- New option --download-hpddm to enable PCHPDDM and KSPHPDDM 61 62```{rubric} IS: 63``` 64 65```{rubric} PetscDraw: 66``` 67 68```{rubric} PF: 69``` 70 71```{rubric} Vec: 72``` 73 74- VecCUDAGet/RestoreArrayReadWrite() changed to 75 VecCUDAGet/RestoreArray() 76- VecViennaCLGet/RestoreArrayReadWrite() changed to 77 VecViennaCLGet/RestoreArray() 78- Added VecGet/RestoreArray/ReadInPlace() to get array of a vector 79 where it is without copying from GPU to CPU. 80 81```{rubric} PetscLayout: 82``` 83 84- Added PetscLayoutCreateFromSizes() 85- Added PetscLayoutCreateFromRanges() 86- Calling PetscLayoutSetUp() twice with different sizes is now 87 forbidden 88 89```{rubric} PetscSection: 90``` 91 92```{rubric} VecScatter & PetscSF: 93``` 94 95- The default VecScatter implementation is changed to PetscSF. In 96 other words, the default VecScatter shares PetscSF's MPI 97 communication code. One can use -vecscatter_type mpi1 to go back 98 to the old implementation. 99- Added new InsertMode MAX_VALUES and MIN_VALUES support in 100 VecScatterBegin/End and VecGhostUpdateBegin/End. 101- PetscSFComputeMultiRootOriginalNumbering: add output argument with 102 the number of multiroots for convenience 103- Added an enum type PetscSFPattern for SF graph patterns. Valid 104 values include PETSCSF_PATTERN_ALLGATHER, PETSCSF_PATTERN_GATHER 105 and PETSCSF_PATTERN_ALLTOALL. 106- Added PetscSFSetGraphWithPattern() to set SF graphs with 107 predefined patterns. 108- Added PetscSFComposeInverse() to compose a new SF by putting the 109 inverse of an SF under the another SF. 110- Added MPI-3.0 neighborhood collectives support. One can use 111 command line option -sf_type neighbor to let SF use MPI-3.0 112 neighborhood collectives for communication instead of the default 113 MPI_Send/Recv. 114- PetscSF is now CUDA-aware. The rootdata, leafdata arguments passed 115 to SF routines can be either GPU pointers or CPU pointers. Use a 116 CUDA-aware MPI and option -use_gpu_aware_mpi to enable it. 117- VecScatter is also CUDA-aware. You can do VecScatter on CUDA 118 vectors without copying them from GPU to CPU. Again, you need a 119 CUDA-aware MPI and option -use_gpu_aware_mpi. 120- Removed PetscSFCreateFromZero. Instead, users should use 121 PetscSFCreate() to create an SF, and then set its graph with 122 PetscSFSetGraphWithPattern(..,PETSCSF_PATTERN_GATHER). 123- Renamed PetscSFGetRanks() to PetscSFGetRootRanks(). 124 125```{rubric} Mat: 126``` 127 128- MatShift(Mat,0); will no longer silently insure there are no 129 missing diagonal entries. (Previously it would put 0 into any 130 diagonal entry that was missing) 131- Renamed MatComputeExplicitOperator() into MatComputeOperator() and 132 MatComputeExplicitOperatorTranspose() into 133 MatComputeOperatorTranspose(). Added extra argument to select the 134 desired matrix type 135- MatLoad() now supports loading dense matrices from HDF5/MAT files. 136- Added new Mat type, MATKAIJ, for matrices that can be expressed in 137 a particular Kronecker (tensor) product form. 138- Added MatCompositeSetScalings() to set separate scaling factors 139 for component matrices. 140- Added a Boolean option -mat_composite_merge_mvctx to merge Mvctx 141 of component matrices to optimize communication in MatMult() for 142 ADDITIVE matrices. Default is true. 143- Added MATSEQDENSECUDA class to use GPUs for dense linear algebra. 144 145```{rubric} PC: 146``` 147 148- Renamed PCComputeExplicitOperator() into PCComputeOperator(). 149 Added extra argument to select the desired matrix type 150- Added support for PCCHOLESKY with MATSOLVERMUMPS and SBAIJ 151 matrices with bs greater than 1 152- Added support for PCLU with MATSOLVERMKL_PARDISO (resp. 153 MATSOLVERMKL_CPARDISO) and SEQBAIJ (resp. MPIBAIJ) matrices 154- Added support for PCCHOLESKY with MATSOLVERMKL_PARDISO (resp. 155 MATSOLVERMKL_CPARDISO) and SEQSBAIJ (resp. MPISBAIJ) matrices 156- Added new preconditioner PCHPDDM, cf. 157 src/ksp/ksp/examples/tutorials/ex71.c or 158 src/snes/examples/tutorials/ex56.c 159 160```{rubric} KSP: 161``` 162 163- Renamed KSPComputeExplicitOperator() into KSPComputeOperator(). 164 Added extra argument to select the desired matrix type 165- KSPCGGLTRGetMinEig(KSP,PetscReal\*) -> 166 KSPGLTRGetMinEig(KSP,PetscReal\*) 167- KSPCGGLTRGetLambda(KSP,PetscReal\*) -> 168 KSPGLTRGetLambda(KSP,PetscReal\*) 169- KSPCGNASH, KSPCGSTCG, KSPCGGLTR -> KSPNASH, KSPSTCG, KSPGLTR 170- Added new Krylov solver KSPHPDDM, cf. 171 src/ksp/ksp/examples/tutorials/ex75.c or 172 src/ksp/ksp/examples/tutorials/ex9.c 173 174```{rubric} SNES: 175``` 176 177- Changed SNES_CONVERGED_TR_DELTA to SNES_DIVERGED_TR_DELTA with a 178 negative value to indicate diverged, unclear why it was ever 179 positive since tiny trust region would indicate trouble, not 180 converged 181 182```{rubric} SNES: 183``` 184 185- -snes_mf no longer turns the preconditioner to none; to use it 186 generally you will also need -pc_type none 187 188```{rubric} SNESLineSearch: 189``` 190 191```{rubric} TS: 192``` 193 194- Added tangent linear models for Runge-Kutta methods 195- Added second-order adjoint solvers based on Runge-Kutta methods 196 and Theta methods 197- Improved the usage of first-order adjoint solvers in an 198 optimization context. (The TS object can be reused in the 199 optimization loop) 200- Changed the APIs for integrand evaluations and corresponding 201 derivative evaluations. TSSetCostIntegrand() is deprecated. 202 (Instead a quadrature TS is used to handle the callbacks) 203- TSTrajectory creates a unique name for folders that store the 204 checkpoint data. Users can rerun adjoint codes without worrying 205 about the folder names, and run multiple codes under the same 206 directory. 207- Added support for using finite-differencing (and coloring) to 208 approximate the Jacobians needed by the adjoint solvers. 209 -snes_fd_color can be used for both implicit and explicit methods. 210 211```{rubric} DM/DA: 212``` 213 214- Add DMGetLocalSection() to be used in preference to 215 DMGetSection(). 216- Add DMSetLocalSection() to be used in preference to 217 DMSetSection(). 218- DMGetDefaultSF() replaced with DMGetSectionSF(). 219- DMSetDefaultSF() replaced with DMSetSectionSF(). 220- DMCreateDefaultSF() replaced with DMCreateSectionSF(). 221- DMAddLabel() now increments the reference count of the DMLabel. 222- DMRemoveLabel() now destroys the DMLabel if the output argument is 223 NULL. 224- Add DMRemoveLabelBySelf() which looks up the DMLabel by itself, 225 removes from DM and destroys. 226 227```{rubric} DMPlex: 228``` 229 230- Rename DMPlexCreateSpectralClosurePermutation() to 231 DMPlexSetClosurePermutationTensor() 232- Add DMPlexFindVertices() for vertex coordinates -> DAG point 233 lookup 234- Add DMPlexGetOverlap() to get the partition overlap 235 236```{rubric} DMNetwork: 237``` 238 239- Changed prototypes for DMNetworkSetSizes() 240 241```{rubric} PetscViewer: 242``` 243 244- Removed PetscViewerHDF5{Get,Set}AIJNames() which are likely not 245 really needed 246- PetscViewerHDF5SetCollective() and -viewer_hdf5_collective can be 247 used to switch between independent and collective transfer mode. 248 Defaults now to false (independent). 249 250```{rubric} SYS: 251``` 252 253- Added PetscCheckDupsInt() to check if a PetscInt array has dups. 254- Added an argument to PetscBinaryRead() and 255 PetscBinarySynchronizedRead() to return the number of items read. 256 257```{rubric} AO: 258``` 259 260```{rubric} Sieve: 261``` 262 263```{rubric} Fortran: 264``` 265