1# Changes: 2.0.24 2 3## Changes 4 5(See [Features] below) 6 7```{rubric} General: 8``` 9 10- Changed PETSC_ARCH on Microsoft Windows platforms from nt to win32, and from 11 nt_gnu to win32_gnu. 12- Moved all the compiler/optimization information for each 13 PETSC_ARCH from the various `base.g`, `base.O_c++` etc. files 14 all into the single file `base_variables`. Now configuration for 15 your system should require only editing the files 16 \$\{PETSC_ARCH}/base and \$\{PETSC_ARCH}/`base.site` 17- The PETSC_ARCH `rs6000` is now intended for IBM rs6000 18 workstations running MPICH or LAM, while `rs6000_sp` is for IBM 19 SPs. 20- Removed the gvec directory from the distribution. If you are using 21 this please let us and know and we can provide it or provide 22 alternative code to do what you need. 23- Routines with the suffix "`withcoloring`" have been changed to 24 the suffix "`color`" to get around the 31 character limit in 25 names. 26- The source code directory structure has changed slightly: pc and 27 ksp are now subdirectories of sles, and ao and da are 28 subdirectories of a new directory called dm (data management). 29- The PETSc libraries are now: -lpetscts -lpetscsnes -lpetscsles 30 -lpetscdm -lpetscmat -lpetscvec -lpetsc. Each library is now only 31 dependent on libraries to the right of it in the list above. For 32 example, if you are only using the linear solvers, you only need 33 to list "-lpetscsles -lpetscdm -lpetscmat -lpetscvec -lpetsc" and 34 if you are only using the vectors you only need to list 35 "-lpetscvec -lpetsc". 36- For users who previously could not use the PETSc makefiles because 37 the PETSc rules for making .o files conflicted with the user's 38 rules, we have introduce a new file that may be included by the 39 user, `${PETSC_DIR}/bmake/${PETSC_ARCH}/base_variables`, which 40 defines all the useful PETSc makefile variables, but not the 41 rules. This should make it easier for people who previously had 42 trouble using the PETSc makefiles. We highly recommend using the 43 PETSc makefiles when possible because they are immediately 44 portable across all systems that support PETSc. 45 46```{rubric} AO (Application Orderings): 47``` 48 49```{rubric} TS (Timestepping Solvers): 50``` 51 52- Removed `TSSetRHSJacobianDefault`() - you can now call 53 `TSSetRHSJacobian`(... `TSDefaultJacobianColor`,....) 54 directly from Fortran 55- Changed `TSDefaultJacobianSlow()` to `TSDefaultJacobian()` 56 57```{rubric} SNES (Nonlinear Solvers): 58``` 59 60- S`NESSetConvergenceHistory()` takes an additional argument; 61 see the manual page for details. 62 63- Changed the interface for matrix-free methods in SNES so that is 64 more flexible, in particular: 65 66 - Changed`SNESDefaultMatrixFreeMatCreate()` to 67 `MatSNESFDMFCreate()`. 68 69 - Added routines 70 71 - MatSNESFDMFSetHHistory(Mat,Scalar \*,int); 72 - MatSNESFDMFResetHHistory(Mat,Scalar \*,int); 73 - MatSNESFDMFSetParameters(Mat,double,double); 74 - MatSNESFDMFGetH(Mat,Scalar \*); 75 - MatSNESFDMFKSPMonitor(KSP,int,double,void \*); and the 76 corresponding option `-snes_mf_ksp_monitor` 77 78 - Added support for an alternative way to compute the 79 differencing parameter in matrix-free methods using the 80 Walker-Pernice srategy, accessible via the option 81 `-snes_mf_type` wp 82 83- Changed the calling sequence of `SNESSetLineSearch()` so that it 84 accepts an optional user-defined context variable. Likewise, 85 changed the calling sequences of the various line search routines, 86 e.g., 87 `SNESCubicLineSearch(), SNESQuadraticLineSearch()`, 88 etc. 89 90```{rubric} SLES (Linear Solvers): 91``` 92 93- See PC and KSP 94 95```{rubric} KSP (Krylov Subspace Methods): 96``` 97 98- Changed the calling sequence of 99 `KSPComputeEigenvalues(KSP,int,double*,double*,int *neig);` 100 to return as the final value the number of eigenvalues computed; 101 see the manual page for more details. 102- Changed GMRES to use the Gram-Schmidt method with one optional 103 step of iterative refinement as the default orthogonalization 104 procedure, instead of the modified Gram-Schmidt method. This 105 change was urged by Rich Lehoucq. It could cause very minor 106 differences in convergence rates for codes run before and after 107 this change. 108- The option `-ksp_bsmonitor` is not longer needed; use 109 -`ksp_truemonitor` for the same affect. 110- Added an additional argument to `KSPSetResidualHistory()`; see 111 the manual page for details. This change was suggested by Maria 112 Murillo. 113 114```{rubric} PC (Preconditioners): 115``` 116 117- Removed support for block Gauss-Seidel from the distribution; 118 `-pc_type bgs` is no longer supported. 119- The Eisenstat preconditioner (SSOR variant) now uses diagonal 120 scaling by default, and the options 121 `PCEisenstatUseDiagonalScaling()` and 122 `-pc_eisenstat_diagonal_scaling` have been replaced with 123 `PCEisenstatNoDiagonalScaling()` and 124 `-pc_eisenstat_no_diagonal_scaling` 125 126```{rubric} MAT (Matrices): 127``` 128 129- Replaced`MatGetSubMatrixCall`() with `MatReuse().` 130- Changed the calling sequence of `MatILUFactor()` and 131 `MatILUFactorSymbolic()` to increase flexibility of adding new 132 ILU options. 133- Added an additional argument to `MatCopy()`; 134 `SAME_NONZERO_PATTERN` or `DIFFERENT_NONZERO_PATTERN.` 135- Added an additional argument to `MatDuplicate()`, 136 `MAT_COPY_VALUES` or `MAT_DO_NOT_COPY_VALUES.` 137- Changed the flag `MAT_NEW_NONZERO_LOCATION_ERROR` to 138 `MAT_NEW_NONZERO_LOCATION_ERR`; also changed 139 `MAT_NEW_ALLOCATION_ERROR` to `MAT_NEW_ALLOCATION_ERR` 140- Changed `MatOrder`xxx to `MatOrdering`xxx; changed 141 `MatOrderingType` to char\* from enum 142- Changed `Mat`xxx`Reordering`xxx to 143 `Mat`xxx`Ordering`xxx changed command line option 144 `-mat_order` to -`mat_ordering_type;` changed 145 `MatColoringType`to char\* from enum 146- Changed `Partitioning`xxx to `MatPartitioning`xxx 147 148```{rubric} DA (Distributed Arrays): 149``` 150 151- `DAGetInfo()` has a new final argument, the stencil type. See 152 the manual change your current code to work, you only need add an 153 extra `PETSC_NULL` as a final argument. 154 155```{rubric} VEC (Vectors): 156``` 157 158- After a call to `VecCreate()` you MUST either call 159 `VecSetType()` or `VecSetFromOptions()` on the vector before 160 using it for any purpose. The `VecCreate`xxx() routines (e.g., 161 `VecCreateSeq(), VecCreateMPI()`) do not need to have calls to 162 VecSetType() or VecSetFromOptions() after them. 163- All `VecGetArray()` calls MUST now be matched with a 164 `VecRestoreArray()` call; previous PETSc versions did not force 165 compliance with this rule. 166- The command line names for changing the vector type in 167 `VecCreate(`) are now `-vec_type mpi` or `-vec_type shared` 168 rather than `-vec_mpi` or `-vec_shared` 169- Changed the `VecType` variable type from an enum type to a 170 string. 171- Changed the calling sequence for `VecGetType()`; see the manual 172 page for details. 173- Changed `VecGhostGetLocalRepresentation()` and 174 `VecGhostRestoreLocalRepresentation()`, to 175 `VecGhostGetLocalForm()` and `VecGhostRestoreLocalForm()`, 176 respectively; the previous names had too many characters for some 177 machines. 178 179```{rubric} IS (Index Sets): 180``` 181 182```{rubric} Draw (Graphics): 183``` 184 185- Replaced`VIEWER_DRAWX_`.... with `VIEWER_DRAW_`.... 186- The arguments of `ViewerDrawGetDraw`() have been changed; see 187 the manual page for details. 188- `DrawTensorContour()` has changed; its final argument is now an 189 array can now use `VecView()` to create the contour plot. 190 191```{rubric} Viewers: 192``` 193 194- Changed the names associated with the MATLAB viewer to Socket 195 viewer; this reflects our plan to support additional graphics 196 engines with PETSc. 197- Changed `ViewerFileOpenASCII()` to `ViewerASCIIOpen().` 198- Changed `ViewerDrawOpenX(`) to `ViewerDrawOpen().` 199- Changed `ViewerFileOpenBinary()` to `ViewerBinaryOpen().` 200- Changed `ViewerType` from an enum to a char \*. 201 202```{rubric} System: 203``` 204 205- Changed the calling sequence of 206 `PetscGetHomeDirectory(char dir[],int maxlen)`. 207- Changed the calling sequence of 208 `PetscFixFilename(const char filein[],char fileout[]).` 209- Changed the calling sequence of `PetscGetDate().` 210 211```{rubric} Error Handling: 212``` 213 214```{rubric} Event Logging: 215``` 216 217```{rubric} Fortran Interface: 218``` 219 220## Features 221 222(See [Changes] above) 223 224```{rubric} General: 225``` 226 227- Add the routine `OptionsGetAll().` 228- Added support for Sun Solaris running on Intel processors; 229 PETSC_ARCH solaris_x86. 230- Added option -`optionsleft_off` so BOPT=g version of code will 231 not print warnings about unused options. 232- The environment variable PETSC_ARCH is now required to use the NT 233 distribution. 234- Added the routine `OptionsGetLogical().` 235- We now include PETSC_ARCH of solaris_gnu, rs6000_gnu for those 236 systems when using the gnu compilers. 237- Thanks to the generosity of the FreeBSD organization, we are now 238 supporting freebsd again. 239- Added optional filename to `-log_info` \<filename> option. PETSc 240 will open a separate file, called filename.rank for each processor 241 and print the output there. 242- Added `PetscTypeCompare()`; see the manual page. 243 244```{rubric} AO (Application Orderings): 245``` 246 247- `AOPetscToApplicationIS()` and `AOApplicationToPetscIS()`, 248 when passed a stride index set, now handle them correctly. 249 250```{rubric} TS (Timestepping Solvers): 251``` 252 253- Added `TSSetTypeFromOptions().` 254 255```{rubric} SNES (Nonlinear Solvers): 256``` 257 258- Added `-snes_vecmonitor` and `SNESMonitorVec()` to allow 259 graphically monitoring the solution. 260- Added `SNESSetTypeFromOptions().` 261- Added the routine `SNESSetLineSearchCheck()`, which sets a 262 routine to check the validity of new iterates computed by line 263 search routines; see the manual page for details. 264 265```{rubric} SLES (Linear Solvers): 266``` 267 268- See PC and KSP 269- Added `SLESSetTypesFromOptions().` 270 271```{rubric} KSP (Krylov Subspace Methods): 272``` 273 274- Added the function `KSPSetAvoidNorms()` and corresponding option 275 `-ksp_avoid_norms`. For the methods CG, Richardson, Bi-CG-stab, 276 CR, and CGS, this eliminates the computation of the residual norm 277 at each iteration (which is an expensive, collective operation). 278 Then the convergence criterion depends only on the maximum number 279 of iterations the users sets with `KSPSetTolerances().` This is 280 useful when using the Krylov method as a smoother with a fixed 281 number of iterations (say, e.g., 3 iterations). 282- Added the KSP type of `KSPBICG` (contributed by Victor Eijkhout) 283 and added support to some of the preconditioners to apply the 284 preconditioner transpose (required by KSPBICG). 285- Added `-ksp_vecmonitor` and `KSPMonitorVec()` to allow 286 graphically monitoring the solution's convergence. 287- Added `KSPSetTypeFromOptions().` 288 289```{rubric} PC (Preconditioners): 290``` 291 292- Added `PCLUSetReuseReordering()` and `PCLUSetReuseFill()` so 293 that SLES can reuse the reordering and fill information for a new 294 factorization of a matrix with slightly different nonzero 295 structure than the previous factorization. The corresponding 296 command line options are -`pc_lu_reuse_reordering` and 297 `-pc_lu_reuse_fill`. These two options only have an effect when 298 the `SLESSetOperators()` option of `DIFFERENT_NONZERO_PATTERN` 299 is used; otherwise the ordering and fill information is always 300 reused. 301- Added `PCGetVector()`, not expected to be used by application 302 programmers. 303- Added the option `-pc_ilu_diagonal_fill` and the corresponding 304 routine `PCILUSetAllowDiagonalFill()`; see the manual page for 305 details; helps ILU(k) on matrices with missing diagonal entries. 306 Suggested by David Hysom. 307- Added `PCSetTypeFromOptions().` 308 309```{rubric} MAT (Matrices): 310``` 311 312- Added `MatSeqAIJSetColumnIndices()` and 313 `MatSeqBAIJSetColumnIndices()`. 314- If the option `MAT_IGNORE_OFF_PROC_ENTRIES` is used, then the 315 routines `MatAssemblyBegin()` and `MatAssemblyEnd()` will not 316 cause any parallel communication or synchronization. 317- If the option `MAT_NEW_NONZERO_LOCATIONS` is used, one less 318 collective call will be made in the `MatAssemblyEnd()` routines 319 for MPIAIJ and MPIBAIJ. 320- Fixed bugs in `MatReorderForNonzeroDiagonal()` and made it more 321 robust. 322- Fixed bugs in factorization for AIJ matrices with variable size 323 inodes. 324- Indices that are negative passed into `MatSetValues...()` are 325 now ignored (rather than generating an error). This allows easily 326 keeping homogeneous Dirichlet boundary nodes out of the vectors 327 and matrices for unstructured grid problems; just indicate those 328 node numbers with negative numbers. 329- Added additional optimized code for BAIJ matrices with block sizes 330 2, 3, 5, 6, and 7. 331- Improved the performance of `MatSetValues()` and 332 `MatAssemblyXXX()` for parallel matrices a great deal. 333- Added the option `-matstash_initial_size` \<stashsize> and 334 `-matstash_block_initial_size` \<stashsize> and the routine 335 `MatSetStashInitialSize()` to allow further optimization of 336 off-processor`MatSetValues().` 337 338```{rubric} DA (Distributed Arrays): 339``` 340 341- Added graphics support to DA vectors in 1d and 2d, with contour 342 plotters for 2d. 343 344```{rubric} VEC (Vectors): 345``` 346 347- Extended `VecCreate()` by allowing registration of new vector 348 types with `VecRegister()` see the manual page for details. 349- Indices that are negative passed into `VecSetValues...()` are 350 now ignored (rather than generating an error). This allows easily 351 keeping homogeneous Dirichlet boundary nodes out of the vectors 352 and matrices for unstructured grid problems; just indicate those 353 node numbers with negative numbers. 354- Added `VecDotBegin()`, `VecDotEnd()`, `VecNormBegin()`, 355 `VecNormEnd()`, which reduce communication overhead in parallel; 356 see the manual pages for details (suggested by Victor Eijkhout). 357- If the option `VEC_IGNORE_OFF_PROC_ENTRIES` is used, the 358 `VecAssemblyBegin()` and `VecAssemblyEnd()` routines will not 359 cause any parallel communication or synchronization (previously 360 `VecAssemblyBegin()` still used a barrier). 361- Added `VIEWER_FORMAT_ASCII_INDEX` which causes the index for 362 each vector entry to be printed with the vector values. 363- Added three new vector scatter options; `-vecscatter_merge` and 364 `-vecscatter_ssend` and `-vecscatter_sendfirst`; these may 365 improve performance a great deal when using MPICH for MPI on 366 ethernet or fast ethernet. 367- Added `VecStrideNorm(), VecStrideScatter()`, and 368 `VecStrideGather().` 369- Improved the performance of `VecSetValues()` and 370 `VecAssemblyXXX()` for parallel vectors. 371- Added the option `-vecstash_initial_size` \<stashsize> and 372 `-vecstash_block_initial_size` \<stashsize> and the routine 373 `VecSetStashInitialSize()` to allow further optimization of 374 off-processor `VecSetValues()`. 375 376```{rubric} IS (Index Sets): 377``` 378 379- Added `ISStrideToGeneral()`, which converts a stride type index 380 set to a general type. 381 382```{rubric} Draw (Graphics): 383``` 384 385```{rubric} Viewers: 386``` 387 388- Added `ViewerASCIIPushTab()`, `ViewerASCIIPopTab()` and 389 `ViewerASCIIPrintf()`. These allow multi-level display of solver 390 information (tabing the text further for each inner solver). 391 Thanks to Victor Eijkhout and Matt Knepley for pushing this. 392 393```{rubric} System: 394``` 395 396```{rubric} Error Handling: 397``` 398 399```{rubric} Event Logging: 400``` 401 402```{rubric} Fortran Interface: 403``` 404 405- Added Fortran 90 interface support for HP Convex and 406 Solaris.machine. 407