1# Changes: 3.0.0 2 3```{rubric} General: 4``` 5 6- Changed the MATLAB engine portion of the MATLAB configure code to 7 require a separate flag --with-matlab-engine 8- Changed the Socket viewer to be the same as the binary viewer 9 except for its creation 10- Changed the MATLAB Socket code to work the same as the Matlab 11 binary reader except for its creation 12- You can now replace the PetscVFPrintf() function pointer to 13 redirect all stdout/stderr output in Microsoft Windows for example. 14- Removed MPICCommToFortran() and MPIFortranCommToC() since 15 MPI_Comm_c2f() and f2c() are now always available. 16- PetscOptionsInsertFile() now takes a MPI_Comm as the first 17 argument and a final flag argument indicating if the file MUST be 18 located. It is also changed to be more scalable, only the 0th 19 process opens it and broadcasts the input to the other processes. 20- Added PetscObjectIncrementTabLevel() to allow proper indenting of 21 monitor output for embedded solvers for multigrid levels, for 22 block Jacobi, for SNES inside TS and KSP inside SNES etc. 23 24```{rubric} Logging: 25``` 26 27- The int stage used in the PetscLogStageXXX() routines is now a 28 PetscLogStage 29- PetscLogEventRegister() and PetscLogStageRegister() now return the 30 result in the final argument instead of the first 31- PetscLogClassRegister() is changed to PetscClassIdRegister() and 32 returns the classid in the final argument, not the first 33- PetscEvent is now PetscLogEvent 34 35```{rubric} config/configure.py: 36``` 37 38- Changed location of base makefiles to conf from bmake/common 39- Changed location of generated base makefiles to \$PETSC_ARCH/conf 40 instead of bmake/\$PETSC_ARCH 41- Changed location of generated include files to \$PETSC_ARCH/include 42- Changed location of generated libraries (including from external 43 packages) to \$PETSC_ARCH/lib 44- You will need to change include \$\{PETSC_DIR}/bmake/common/base to 45 \$\{PETSC_DIR}/conf/base 46 47```{rubric} IS: 48``` 49 50- ISPartitioningCount() now takes an additional argument, the length 51 of the count array (that is the number of partitions). 52 53```{rubric} Vec: 54``` 55 56- Added logical argument to VecSetOption() to toggle option in 57 either way 58- The PetscMap inside the Vec object is now allocated and reference 59 counted and shared between vectors and matrices, this will 60 decrease memory usage on systems with a large size. 61 62```{rubric} VecScatter: 63``` 64 65```{rubric} Mat: 66``` 67 68- MatSetOption() now takes a final PetscTruth flag to toggle the 69 option. The redundant options like MAT_NO_SYMMETRIC are removed 70- The MatSetOption() options MAT_ROWS_SORTED, MAT_COLUMNS_SORTED are 71 no longer needed and are removed. 72- MatConvert() now uses the matrix prefix when using option 73 -matconvert_type. 74- The bdiag matrix formats have been removed 75- MatTranspose() now takes a new second argument MatReuse; also to 76 do an inplace transpose use MAT_REUSE_MATRIX and pass the address 77 of the first argument as the third argument (you can no longer 78 pass 0). 79- MATPLAPACK is removed; instead so long as PETSc is 80 config/configure.py with --download-plapack the MATMPIDENSE matrix 81 will automatically use the parallel plapack solvers 82- The "parallel direct solver" matrix types like 83 MATAIJSPOOLES are ALL gone. Now you use 84 -pc_factor_mat_solver_package 85 spooles etc or PCFactorSetMatSolverPackage() or if working 86 directly with 87 matrices, MatGetFactor(A,MATSPOOLES,...) 88- Removed MatFDColoringSetRecompute(), now use 89 MatFDSetFrequency(mat,-2) to have Jacobian computed at next Newton 90 step but never again. 91- Removed MatFDColoringSet/GetFrequency() and -mat_fd_coloring_freq 92 since you can now use SNESSetLagJacobian() or -snes_lag_jacobian 93- The PetscMap inside the Mat object is now allocated and reference 94 counted and shared between vectors and matrices, this will 95 decrease memory usage on systems with a large size. 96- The first argument to MatXXXFactorSymbolic/Numeric() is now the 97 factored matrix 98- The fields global_rows,global_columns,local_rows,local_columns 99 have been removed from the MatGetInfo() data. User MatGetSize(), 100 MatGetLocalSize() to get that data 101 102```{rubric} PC: 103``` 104 105- PCHasApplyTranspose() was renamed to PCApplyTransposeExists(). 106- Added much faster matrix converter to use hypre preconditioners 107 for PETSc AIJ matrices 108- ILU preconditioner now defaults to use shift to prevent zero pivot 109- ICC preconditioner now defaults to use Manteuffel shift to force 110 positive definiteness 111- Added -pc_factor_shift_in_blocks and PCFactorSetShiftInBlocks() 112 made default for ILU 113- PCApplyRichardson() now returns two additional arguments, the 114 number of iterations performed and the reason it finished. 115 116```{rubric} KSP: 117``` 118 119- KSPSetConvergenceTest() now takes an optional final argument, 120 destroy() that will be called to destroy the context passed in as 121 the second to last argument 122- KSPDefaultConverged() now has a KSPDefaultConvergedCreate() and 123 KSPDefaultConvergedDestroy() that creates the default context to 124 be passed KSPSetConvergenceTest() and the destroy to be passed in. 125- Added KSPIBCGS a variant of Bi-CG-stab that has only 1 126 synchronization point rather than 3 in the usual. 127 128```{rubric} SNES: 129``` 130 131- SNESSetRhs() and SNESSetSolution() were removed. Use instead 132 SNESSolve(snes, b, x) to pass right-hand side (optional, can be 133 PETSC_NULL) and solution (required). 134- SNES now takes ownership of user-provided vector for right hand 135 side and solution passed to SNESSolve(), and until the next 136 SNESSolve() is called. 137- SNES now takes ownership of user-provided vector for function 138 evalutation passed to SNESSetFunction(), thus this vector can be 139 safely destroyed after this call. 140- SNESConverged_LS() and SNESConverged_LS() were removed. Use 141 SNESDefaultConverged() or SNESSkipConverged() as convergence test. 142- Option -snes_convergence_test was added, accepting values 143 default|short, for setting SNESDefaultConverged() or 144 SNESSkipConverged() as convergence test. 145- Option -snes_no_convergence_test was removed. Use instead 146 "-snes_convergence_test skip". 147- Do not use the error PETSC_ERR_ARG_DOMAIN within your 148 FormFunction() rather call SNESSetFunctionDomainError. 149- The line search functions now take an additional argument xnorm. 150- SNESSetConvergenceTest() takes another optional argument 151 PetscErrorCode (*destroy)(void*) that will be called with 152 SNESDestroy() to destroy the context. 153- Added SNESSetLagPreconditioner(), -snes_lag_preconditioner, 154 SNESGetLagPreconditioner() 155- Added SNESSetLagJacobian(), -snes_lag_jacobian, 156 SNESGetLagJacobian() 157 158```{rubric} TS: 159``` 160 161```{rubric} DA: 162``` 163 164- Added DAGetNeighbors() 165- Added DAGetOwnershipRanges() 166 167```{rubric} DMMG: 168``` 169 170- Added DMMGSetFromOptions(), this can only be used in conjunction 171 with DMMGSetSNES(). You should call this sometime after 172 DMMGSetSNES() is called, otherwise the SNES/KSPSetFromOptions() 173 does not get called. 174- Removed -dmmg_snes_monitor since now -snes_monitor and 175 -snes_monitor_short will now do the proper indenting so this is no 176 longer needed 177- Removed -dmmg_ksp_monitor since now -ksp_monitor\[\_short) and 178 -mg_levels_ksp_monitor\[\_short) etc will handle the proper 179 indenting. 180- Removed -dmmg_jacobian_period since you can use -snes_lag_jacobian 181 182```{rubric} PetscViewer: 183``` 184 185- added PETSC_VIEWER_STDOUT\_(comm) for Fortran 186- binary viewer now supports MPI IO for Vec loading and storing, use 187 -viewer_binary_mpiio or PetscViewerBinarySetMPIIO() to enable it. 188- Reworked the MATLAB objects sreader and freader to be called 189 PetscOpenSocket and PetscOpenFile, now PetscBinaryWrite and 190 PetscBinaryRead can be used on the same socket connection to send 191 matrix/vectors in both directions. See 192 src/ksp/ksp/examples/tutorials/ex41.c and ex41.m 193 194```{rubric} SYS: 195``` 196 197- PetscLogFlopsNoCheck() no longer exists; you can simply call 198 PetscLogFlops() it no longer has a return in it. 199 200```{rubric} ExternalPackages: 201``` 202