1# Changes: 3.2 2 3```{rubric} General: 4``` 5 6- --download-c-blas-lapack is replaced with --download-f2cblaslapack 7- --with-precision=\_\_float128 --download-f2cblaslapack is now 8 support for newish GNU gcc compiler 9- Calling sequence of PetscBinarRead.m has been changed 10- All XXXDestroy() functions now take a pointer to the object itself 11 so that it can be nullified after destruction. 12- PetscError() and SETERRQX() now take a MPI_Comm as the first 13 argument to indicate where the error is known. If you don't know 14 what communicator use then pass in PETSC_COMM_SELF 15- Added PetscObjectAddOptionsHandler() that allows adding new 16 routines to any object that are called to process options when 17 XXXSetFromOptions() is called. 18- Changed PetscTruth to PetscBool, PETSC_TRUTH to PETSC_BOOL, 19 PetscOptionsTruth to PetscOptionsBool, etc. 20- Introduced PetscCopyMode 21- Changed -log_history to -history and PetscLogOpenHistory() 22 PetscLogCloseHistory() to PetscOpenHistory(), PetscCloseHistory() 23 because "log" is reserved for related to the performance logging 24- Changed PetscOptionsPrint() to PetscOptionsView() 25- Changed PetscLogPrintSummary() to PetscLogView() 26- Using gcc 4.6 you can now ./configure --with-precision=\_\_float128 27 --download-qblaslapack to get computations in quad precision. 28 gfortran 4.6 is also supported. Warning some of the PETSc printing 29 of numbers in some places will print garbage. I haven't figured 30 out a way to handle the %G format. Can be run in parallel :-) 31- PetscFListFind() now takes a searchlibraries flag, if this is set 32 and the function is NOT found in the function list then the 33 libraries and executable are searched (when shared or dynamic 34 libraries are used). Previously it always search the libraries and 35 executables if not found in the list. 36- PetscOpenMPxxx() utilities are now PetscHMPIxxx() for hierarchical 37 MPI, the previous name was bad 38 39```{rubric} Logging: 40``` 41 42- PetscCookie changed to PetscClassId in all forms. 43 44```{rubric} config/configure.py: 45``` 46 47- --with-64-bit-pointers option removed. It doesn't work properly 48 anyway. The user should specify the correct 32bit or 64bit 49 compilers to configure. For eg: 50 `configure --with-cc='gcc -m64' --with-fc='gfortran -m64'` 51- Python requirement is changed from 2.2 to 2.3 52- Changed --with-shared to --with-shared-libraries, 53 --known-mpi-shared to --known-mpi-shared-libraries and 54 --with-dynamic to --with-dynamic-loading 55- 'ifneeded' support removed. '--download-package=ifneeded' should 56 now be '--download-package' 57- The make macro PETSC_INCLUDE has been replaced by 58 PETSC_CC_INCLUDES and PETSC_FC_INCLUDES for C and Fortran, 59 respectively. 60 61```{rubric} IS: 62``` 63 64- ISBlock(),ISStride() are removed. Use 65 PetscTypeCompare((PetscObject)is,ISBLOCK,&flag), 66 PetscTypeCompare((PetscObject)is,ISSTRIDE,&flag) instead. 67- Added ISCreate(), ISSetType(), ISRegister() etc to match style of 68 other PETSc objects. Also added ISGeneralSetIndices(), 69 ISBlockSetIndices(), ISStrideSetStride() 70- ISCreateGeneral() and ISCreateBlock() now takes PetscCopyMode as 71 an argument and hence ISCreateGeneralNC() and 72 ISCreateGeneralWithArray() are not needed and removed. Use 73 ISCreateGeneral() with the argument PETSC_OWN_POINTER and 74 PETSC_USE_POINTER instead. 75- ISLocalToGlobalMappingCreate() now takes PetscCopyMode as an 76 additional argument and ISLocalToGlobalMappingCreateNC() is no 77 longer needed and removed 78- ISStrideToGeneral() is replaced with ISToGeneral() that works for 79 all basic IS types. 80- ISCreateBlock() now takes indexing relative to block, no longer 81 relative to element. This is to match the paradigm of 82 Vec/MatSetValuesBlocked() 83- ISBlockGetBlockSize() is now ISGetBlockSize(). Block sizes can be 84 set for conforming ISGENERAL and ISSTRIDE using ISSetBlockSize(). 85- ISAllGatherIndices() is removed, use ISCreateGeneral() then 86 ISAllGather(). 87 88```{rubric} PF: 89``` 90 91- The source array is marked constant in PFApply and the callback. 92 93```{rubric} Vec: 94``` 95 96- changed VecSqrt() to VecSqrtAbs() 97- VecLoad() and VecLoadIntoVector() have been merged into a single 98 NEW VecLoad() that takes a partially constructed vector as input 99 and loads according to any type or sizes that have previously been 100 set into the Vec. 101- VecDestroyVecs(PetscInt n,Vec \*\*) instead of 102 VecDestroyVecs(Vec\*\*,PetscInt n), also VecDestroyVecsF90(PetscInt 103 n,{Vec, pointer :: x},PetscErrorCode ierr) 104- VecLoad() does NOT access the options database to check for the 105 VecType, call VecSetFromOptions() first if you wish to check it. 106- VecDestroyVecs() now takes the pointer to the first array and 107 zeros it on return 108- VecDestroy() now zeros the pointer to the destroyed vector so it 109 cannot be reused 110- VecDestroyVecs(PetscInt n,Vec \*\*) instead of 111 VecDestroyVecs(Vec\*\*,PetscInt n) 112 113```{rubric} VecScatter: 114``` 115 116- The ghost indices for VecCreateGhostBlock() and 117 VecCreateGhostBlockWithArray() are now by block instead of by 118 entry. 119 120```{rubric} Mat: 121``` 122 123- MAT_SOLVER_XXX is now MATSOLVERXXX 124- MAT_PARTIONING_XXX is now MATPARTITIONINGXXX 125- MATCOLORING_XXX is now MATCOLORINGXXX 126- MATORDERING_XXX is now MATORDERINGXXX 127- It is an error to call MatSetOption() before the implementation 128 has been created (after MatSetSizes() and MatSetType()). Formerly, 129 options were silently ignored in this circumstance. 130- Added MatSetMumpsIcntl() 131- MatLoad() now takes a created Mat as input (and no longer a Mat 132 type), if you provide the size and type in the Mat then that is 133 used other defaults are used. 134- MATCRL -> MATAIJCRL, MATSEQCRL -> MATSEQAIJCRL, MATMPICRL -> 135 MATMPIAIJCRL 136- MatCreateSeqCRL() -> MatCreateSeqAIJCRL() MatCreateMPICRL() -> 137 MatCreateMPIAIJCRL() 138- MATCSRPERM -> MATAIJPERM, MATSEQCSRPERM -> MATSEQAIJPERM, 139 MATMPICSRPERM -> MATMPIAIJPERM 140- MatCreateSeqCSRPERM() -> MatCreateSeqAIJPERM() 141 MatCreateMPICSRPERM() -> MatCreateMPIAIJPERM() 142- Added MatZeroRowsColumns() and MatZeroRowsColumnsIS(). 143- MatZeroRows() and MatZeroRowsIS() now take an x and b vector as 144 optional arguments; if these are provided then the b\[idx[i]\] is 145 set to diag\*x\[idx[i]\]\] for all rows listed in idx[]. 146- MatSetLocalToGlobalMapping() and MatSetLocalToGlobalMappingBlock() 147 now take separate row and column maps. MatPreallocateSetLocal() 148 has an extra argument for the column mapping. 149- MatLoad() does NOT access the options database to check for the 150 MatType, call MatSetFromOptions() first if you wish to check it. 151- Removed MatMFFDSetFromOptions() since one can call 152 MatSetFromOptions() 153- MatGetLocalMat() and MatGetLocalMatCondensed() are now 154 MatMPIAIJGetLocalMat() and MatMPIAIJGetLocalMatCondensed() 155- MatOption MAT_USE_COMPRESSEDROW changed to 156 MAT_CHECK_COMPRESSED_ROW 157 158```{rubric} PC: 159``` 160 161- PCFieldSplitSetIS() and PCFieldSplitSetFields() now take a 162 split-name parameter which is used to define the options database 163 keys. 164- CHOLMOD can be used for Cholesky factorization using AIJ or 165 SBAIJ(1) matrix formats. 166- PCREDUNDANT now uses the inner KSP with the inner PC. Default is 167 still preonly for KSP and LU for PC so default behavior is the 168 same but now you can use for example -redundant_ksp_gmres. 169 PCRedundantGetPC() is now changed to PCRedundantGetKSP() 170- The header "petscmg.h" is renamed to "petscpcmg.h", "petscasa.h" 171 is renamed to "petscpcasa.h". 172- The preconditioner PCBFBT has been removed. The same functionality 173 is available in PCFIELDSPLIT. 174- PCOPENMP is now PCHMPI and its prefix is now -hmpi\_ for 175 heirarchical MPI 176- PCMGSetGalerkin() has a second argument of type PetscBool. 177 178```{rubric} KSP: 179``` 180 181- KSPSetPreconditionerSide() changed to KSPSetPCSide() to match name 182 of second argument 183- -ksp_right_pc -ksp_left_pc changed to -ksp_pc_side 184 left,right,symmetric to match KSPSetPCSide() 185- Added KSPGMRESGetRestart() and KSPGMRESGetCGSRefinementType() 186- Added KSPGMRESGetOrthogonalization() 187- KSPAddOptionsChecker() is replaced with 188 PetscObjectAddOptionsHandler() 189- Added KSPSPECEST which estimates the spectrum on the first solve 190 and uses it to configure a reduction-free method for subsequent 191 solves, intended for use when reductions are expensive such as 192 levels of multigrid. 193 194```{rubric} SNES: 195``` 196 197- Added SNESLineSearchSetMonitor() and -snes_ls_monitor. 198- Add SNESKSPONLY, for solving linear problems with SNES. 199- Added the minlambda argument to SNESLineSearchGetParams() and 200 SNESLineSearchSetParams(). 201 202```{rubric} TS: 203``` 204 205- Rename TSCRANK_NICHOLSON to TSCN and TSRUNGE_KUTTA to TSRK for 206 consistency. 207- TSSetIFunction() and TSSetRHSFunction() have an additional 208 argument for the vector to compute the function value in. If 209 PETSC_NULL is used, then one is created by the TS. 210- TSSetMatrices() has been removed, use TSSetIFunction() and 211 TSSetRHSFunction(), perhaps providing Jacobian matrices and 212 TSComputeRHSFunctionLinear() and/or 213 TSComputeRHSJacobianConstant(). See 214 src/ts/examples/tutorials/ex{2,4,5,6}.c for an example. 215- Added TSARKIMEX: additive Runge-Kutta implicit-explicit methods 216 for multi-rate systems. 217- Changed TSStep() interface to only perform one step, added 218 TSSolve() to perform multiple steps with callbacks and monitors if 219 desired. 220- Added TSSetExactFinalTime(), replaces 221 TSSundialsSetExactFinalTime(). 222 223```{rubric} DM/DA: 224``` 225 226- Change array argument of DAGetArray and related functions from 227 void\*\* to void\* to avoid the need for an explicit cast (the 228 argument still has the meaning of a pointer to d-dimensionally 229 indexed array of user-defined node type, old code will still 230 compile correctly but the cast is no longer necessary). 231- DAGetCoordinates(), DAGetGhostedCoordinates(), and 232 DAGetCoordinateDA() now return borrowed references. The returned 233 object should not be destroyed by the user. 234- Added DAVecGetArrayF90() 235- Changed DASetVertexDivision to DASetOwnershipRanges 236- The SDA object and all its method have been removed 237- The DA, ADDA, Slice and DMComposite objects are now all 238 represented by a DM object. 239- Routines that began with ADDA and Slice now begin with DMADDA and 240 DMSlice 241- DA/ADDA/Slice/DMCompositeGetMatrix() -> DMGetMatrix(), similar for 242 all other routines that have a DM version 243- Removed DASetType(), DARegister() etc since they will all be 244 handled via DMSetType() etc 245- Added DMSetUp() that is called, for example, after all the 246 parameters are passed to the DM object to actually construct the 247 data structures; replace all calls to DASetType() with calls to 248 DMSetUp() 249- DAXXX() routines are now either DMXXX() or DMDAXXX() see 250 petscdmda.h for details 251- The operation DALocalToGlobal() which performed no communication 252 can now be performed with DMLocalToGlobalBegin/End() with 253 INSERT_VALUES. 254- petscda.h, petscdadef.h and petscda.h90 are now petscdmda.h, 255 petscdmdadef.h, and petscdmda.h90 256- DAGetISLocalToGlobalMapping() and 257 DAGetISLocalToGlobalMappingBlck() are now 258 DMGetLocalToGlobalMapping() and DMGetLocalToGlobalMappingBlock() 259 and are collective since they may be constructed lazily. 260- DMGetBlockSize() is added. 261- Changed DMDAPeriodicType to DMDABoundaryType, and changed this 262 enum to only specify one boundary (one for each dimension). This 263 enum is now one of DMDA_BOUNDARY_NONE, DMDA_BOUNDARY_GHOSTED, or 264 DMDA_BOUNDARY_PERIODIC. See DMDABoundaryType man page for more. 265- DMDASetPeriodicity() is now DMDASetBoundaryType(), and API is 266 changed to take three DMDABoundaryType arguments. 267- Changed API for DMDACreate\*D(), DMDAGetInfo() to take the correct 268 number of DMDABoundaryType enums for the dimension. 269- DMDASetGhostedCoordinates() is added to set coordinates of 270 non-periodic ghost cells. 271 272```{rubric} DMMG: 273``` 274 275```{rubric} PetscViewer: 276``` 277 278- PETSC_VIEWER_XXX is now PETSCVIEWERXXX 279- Added PetscViewerASCIIOpenWithFILE() and PetscViewerASCIISetFILE() 280- Added PetscViewerASCIISynchronizedAllow() which must be called 281 before using PetscViewerASCIISynchronizedPrintf() 282 283```{rubric} SYS: 284``` 285 286- PetscOptionsAtoi(),PetscOptionsAtod(),PetscOptionsAtol() -> 287 PetscOptionsStringToInt(), PetscOptionsStringToReal(), 288 PetscOptionsStringToBool() 289- PetscFListFind() takes an additional argument to look up the 290 symbol in dynamically loaded libraries if not already in the list. 291- Added PetscBagSetOptionsPrefix(), which allows a prefix for the 292 option names of bag items. 293- The preloading macros as well as developer-level logging and 294 profiling functions have been namespaced, e.g. PreLoadBegin() is 295 now PetscPreLoadBegin(). 296 297```{rubric} AO: 298``` 299 300```{rubric} Sieve: 301``` 302 303```{rubric} Fortran: 304``` 305 306```{rubric} ExternalPackages: 307``` 308