Change if () { PetscCall() } three liner and friends to one linersfor i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\
Change if () { PetscCall() } three liner and friends to one linersfor i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$[ ]*}\$?\1if (\2) PetscCall(\3$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i ; done for i in `git ls-files | grep "\.[hc]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ }else]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$\([ ]*\)} \([- ._+=a-z0-9A-Z>*,()]*);\)\$?\1if (\2) PetscCall(\3$\4\5$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i ; doneYes, really ugly but Barry still cannot master awkCommit-type: housekeeping
show more ...
TaoSetType: Do not destroy gradient and stepdirection vectorsDefer KSPDestroy to those methods that actually creates a KSPLeave linesearch destroy, since it may be solver dependent
TaoComputeBounds: generate vectors only if needed
Add -include */petscdir.mk to makefile that lacked itfor i in `git ls-files | grep makefile | xargs grep -L petscdir.mk`; do echo $i ; str=`echo $i |sed -e 's?[-a-zA-Z0-9]*/?../?g' -e 's?makef
Add -include */petscdir.mk to makefile that lacked itfor i in `git ls-files | grep makefile | xargs grep -L petscdir.mk`; do echo $i ; str=`echo $i |sed -e 's?[-a-zA-Z0-9]*/?../?g' -e 's?makefile?petsckdir.mk?g'` ; cp $i tmp echo "-include $str" > $i cat tmp >> $idoneCommit-type: makefile, housekeeping/spend 15m
remove garbage from makefilesIncluding * unused FLAGS variables * All: lib that did not work * stray blank lines etcCommit-type: housekeeping/spend 1h
Enable PETSC_ATTRIBUTE_FORMAT()
Cleanup of introduction of PetscCall()* remove bogus error flags from XXXBegin()/End() macros such as PetscOptionsBegin()/End()* rename for consistency certain XXXBegin()/End() macros such as Mat
Cleanup of introduction of PetscCall()* remove bogus error flags from XXXBegin()/End() macros such as PetscOptionsBegin()/End()* rename for consistency certain XXXBegin()/End() macros such as MatPreallocateInitialize()/Finalize()* fix many lingering ierr = XXX that arose from multiline function calls* sync slepc/hpddm - to use snapshots with the same changesCommit-type: error-checking, style-fix/spend 8h
The great renaming:- CHKERRQ() -> PetscCall()- CHKERRV() -> PetscCallVoid()- CHKERRMPI() -> PetscCallMPI()- CHKERRABORT() -> PetscCallAbort()- CHKERRCONTINUE() -> PetscCallContinue()- CHKERRXX
The great renaming:- CHKERRQ() -> PetscCall()- CHKERRV() -> PetscCallVoid()- CHKERRMPI() -> PetscCallMPI()- CHKERRABORT() -> PetscCallAbort()- CHKERRCONTINUE() -> PetscCallContinue()- CHKERRXX() -> PetscCallThrow()- CHKERRCXX() -> PetscCallCXX()- CHKERRCUDA() -> PetscCallCUDA()- CHKERRCUBLAS() -> PetscCallCUBLAS()- CHKERRCUSPARSE() -> PetscCallCUSPARSE()- CHKERRCUSOLVER() -> PetscCallCUSOLVER()- CHKERRCUFFT() -> PetscCallCUFFT()- CHKERRCURAND() -> PetscCallCURAND()- CHKERRHIP() -> PetscCallHIP()- CHKERRHIPBLAS() -> PetscCallHIPBLAS()- CHKERRHIPSOLVER() -> PetscCallHIPSOLVER()- CHKERRQ_CEED() -> PetscCallCEED()- CHKERR_FORTRAN_VOID_FUNCTION() -> PetscCallFortranVoidFunction()- CHKERRMKL() -> PetscCallMKL()- CHKERRMMG() -> PetscCallMMG()- CHKERRMMG_NONSTANDARD() -> PetscCallMMG_NONSTANDARD()- CHKERRCGNS() -> PetscCallCGNS()- CHKERRPTSCOTCH() -> PetscCallPTSCOTCH()- CHKERRSTR() -> PetscCallSTR()- CHKERRTC() -> PetscCallTC()
chkerr and friends wrapped
Remove use of PetscCheckFalse() from TaoCommit-type: error-checking, housekeeping/spend 45m
TAO: add TAOPYTHON classdeprecate Tao basic API to match SNES and TS paradigmsTaoSetFromOptions: call TaoLineSearchSetFromOptions
rename PetscAssert() -> PetscCheck() and PetscAssertDebug() -> PetscAssert()
add PetscAssert() and PetscAssertFalse()
remove trailing newline from SETERRQ
Update badsource rules- Zero or more spaces are not allowed for more returning types- zero spaces not allowed for for|if|while
Remove all double blank lines from sourceCommit-type: petsc-style/2h
checkbadSource: new rule for wrongfully placed "{"
Turn on checkbadSource test to generate an error when found; fix all source code that causes errorsCommit-type: portability-fix, testing-fix, style-fix, feature, maintainability/spend 1.5h
Merge remote-tracking branch 'origin/maint'
Double CHKERRQ
Replace use of 1 with appropriate error code; use PetscObjecComm() instead of PETSC_COMM_SELF for errors when appropriateCommit-type: error-checking, testing-fix, style-fix, examples
Fixed inconsistent naming with CG methods for TRSome of the KSPXXX macros for xxx had an inconsisten KSPCGXXX that was not in the string xxx nameThe KSPCGXXX was used for KSPCreate_CGXXX() but the
Fixed inconsistent naming with CG methods for TRSome of the KSPXXX macros for xxx had an inconsisten KSPCGXXX that was not in the string xxx nameThe KSPCGXXX was used for KSPCreate_CGXXX() but the other method functions were missing the CG, for example, KSPSolve_XXX() (these meant using tags to find functions was cumbersome due to the special cases)Missing Fortran macroRemoved the extraneous CG from the macros and the function usage; now all macros and functions have consistent PETSc style usage that match the string namesAdded deprecation messages for out-dated useAdded new configure check for PETSC_DEPRECATED_MACROI decided to remove the CG from the KSPCGXXX instead of adding a cg to the string name because 1) it was not possible to deprecatethe string names at compile time, we would have to have runtime warnings. 2) the string names are shorter, 3) the stcg alreadyhad a cg (at the end and not the beginning) and that would have to be removed or we'd have the absurd cgstcg. If starting fromsratch today not worrying about legacy I would have all the string names begin with cg consistently (and naturally the KSPXXX wouldhave them as well), but for legacy reasons we have the current naming which is not ideal because it does not clearlyindicate which methods are CG methods. (We have this problem with other subclasses in PETSc also).Commit-type: style-fix
TAOSetUpdate: change the Update callbackIn SNES, the update function does not uses contexts, and thus it does not appear in the callback prototypeWith TAO, since we are explcitily passing the ctx
TAOSetUpdate: change the Update callbackIn SNES, the update function does not uses contexts, and thus it does not appear in the callback prototypeWith TAO, since we are explcitily passing the ctx via TAOSetUpdate, we have to give it back to the user when performing the call
Regularization changed to x-x_old, user hook added into optimization loops, eliminated explicit MatTransposeMatMult option in Hessian computation
all bounded Newton methods are solving the entire CUTEst test set...still need improvements to active set estimation
12345