Remove braces from one-liners
clang-format: convert PETSc sources to comply with clang-format
Convert setfromoptions methods over to PetscTryTypeMethod() approachFlipped the order of the arguments for the function pointers (*setfromoptions)(PetscOptionItem*,obj); and friends to make them co
Convert setfromoptions methods over to PetscTryTypeMethod() approachFlipped the order of the arguments for the function pointers (*setfromoptions)(PetscOptionItem*,obj); and friends to make them consistent with PetscTryTypeMethod() and all the other methodsCommit-type: refactorization/spend 4h
show more ...
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
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
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
rename PetscAssert() -> PetscCheck() and PetscAssertDebug() -> PetscAssert()
add PetscAssert() and PetscAssertFalse()
make PetscInfo() variadic
SETERRQ[1-9]+ begone
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
Fix code that did not pass appropriate PETSc error flags to SETERRQ()Add checkbadSource check for use of SETERRQ() without an appropriate error flagCommit-type: error-checking, bug-fix, testing-f
Fix code that did not pass appropriate PETSc error flags to SETERRQ()Add checkbadSource check for use of SETERRQ() without an appropriate error flagCommit-type: error-checking, bug-fix, testing-fix, style-fix/spend 2.5h
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
Fix misuse of PETSC_COMM_WORLD in library codeThere are still many left, I'm tired of fixing them[szampini@localhost petsc]$ git grep PETSC_COMM_WORLD | grep -v tests | grep -v tutorials | grep '
Fix misuse of PETSC_COMM_WORLD in library codeThere are still many left, I'm tired of fixing them[szampini@localhost petsc]$ git grep PETSC_COMM_WORLD | grep -v tests | grep -v tutorials | grep '\.c' | awk '{print $1}' | uniqsrc/benchmarks/streams/CUDAVersion.cu:src/benchmarks/streams/SSEVersion.c:src/contrib/fun3d/comp/flow.c:src/contrib/fun3d/incomp/flow.c:src/dm/impls/forest/p4est/petsc_p4est_package.c:src/dm/impls/moab/dmmbfem.cxx:src/dm/impls/moab/dmmbmg.cxx:src/dm/impls/moab/dmmbutil.cxx:src/dm/impls/moab/dmmbvec.cxx:src/dm/impls/moab/dmmoab.cxx:src/dm/impls/network/network.c:src/dm/impls/stag/stag.c:src/dm/impls/stag/stag1d.c:src/dm/impls/stag/stag2d.c:src/dm/impls/stag/stag3d.c:src/dm/impls/stag/stagda.c:src/dm/impls/stag/stagutils.c:$src/dm/impls/swarm/data_ex.c:src/dm/impls/swarm/swarm.c:src/dm/impls/swarm/swarm_migrate.c:src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c:src/ksp/ksp/impls/gcr/pipegcr/pipegcr.c:src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c:src/ksp/ksp/impls/tsirm/tsirm.c:src/ksp/ksp/interface/itcreate.c:src/ksp/ksp/interface/iterativ.c:src/ksp/ksp/interface/saws/kspsaws.c:src/ksp/pc/impls/bddc/bddcfetidp.c:src/ksp/pc/impls/fieldsplit/fieldsplit.c:src/ksp/pc/impls/gamg/util.c:src/ksp/pc/impls/gasm/gasm.c:src/ksp/pc/impls/is/nn/nn.c:src/ksp/pc/impls/patch/pcpatch.c:src/ksp/pc/impls/tfs/gs.c:src/ksp/pc/impls/tfs/tfs.c:src/ksp/pc/impls/tfs/xxt.c:src/ksp/pc/impls/tfs/xyt.c:src/ksp/pc/interface/precon.c:src/mat/impls/aij/mpi/mpiaij.c:#definesrc/mat/interface/matrix.c:src/mat/interface/matrix.c:.src/mat/interface/matrix.c:src/mat/interface/matrix.c:$src/mat/utils/multequal.c:src/snes/interface/saws/snessaws.c:src/snes/interface/snes.c:src/sys/classes/draw/interface/drawreg.c:src/sys/classes/random/interface/random.c:src/sys/classes/random/interface/randomc.c:src/sys/classes/viewer/impls/ams/ams.c:src/sys/classes/viewer/impls/ams/amsopen.c:src/sys/classes/viewer/impls/ascii/vcreatea.c:src/sys/classes/viewer/impls/mathematica/mathematica.c:src/sys/dll/reg.c:src/sys/dll/reg.c:staticsrc/sys/dll/reg.c:src/sys/error/adebug.c:src/sys/error/checkptr.c:src/sys/error/errstop.c:src/sys/error/pstack.c:src/sys/error/signal.c:src/sys/ftn-custom/zutils.c:src/sys/info/verboseinfo.c:src/sys/logging/plog.c:src/sys/logging/utils/eventlog.c:src/sys/logging/xmllogevent.c:src/sys/memory/mal.c:src/sys/memory/mtr.c:src/sys/objects/aoptions.c:src/sys/objects/aoptions.c:+src/sys/objects/aoptions.c:src/sys/objects/ftn-custom/zstart.c:src/sys/objects/ftn-custom/zstartf.c:src/sys/objects/inherit.c:src/sys/objects/init.c:src/sys/objects/options.c:+src/sys/objects/options.c:src/sys/objects/pinit.c:MPI_Commsrc/sys/objects/pinit.c:src/sys/utils/mpitr.c:src/sys/utils/mpits.c:+src/sys/utils/pbarrier.c:src/sys/utils/pdisplay.c:src/sys/yaml/yamlimpls.c:src/sys/yaml/yamlimpls.c:+src/sys/yaml/yamlimpls.c:src/tao/pde_constrained/impls/lcl/lcl.c:src/ts/interface/ts.c:src/vec/is/is/utils/iscoloring.c:src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx:src/vec/vec/interface/vector.c:.src/vec/vec/interface/vector.c:
Revert the function name where it is referenced
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
Do some housekeeping and add missing CHKERRQ calls
Regularization changed to x-x_old, user hook added into optimization loops, eliminated explicit MatTransposeMatMult option in Hessian computation
12345