clang-format: convert PETSc sources to comply with clang-format
Wrap PetscCheck and PetscAssert in do { } while (0)These macros look like functions, so they should behave likefunctions. Fix up the resulting invalid syntax due to the previousbehaviour of these
Wrap PetscCheck and PetscAssert in do { } while (0)These macros look like functions, so they should behave likefunctions. Fix up the resulting invalid syntax due to the previousbehaviour of these macros being "if (...)statement_without_semicolon". Fixes #1199.
show more ...
remove garbage from makefilesIncluding * unused FLAGS variables * All: lib that did not work * stray blank lines etcCommit-type: housekeeping/spend 1h
Docs: bulk add backticks to .seealso man page fields```pythonimport osimport reimport fileinputdef _process_word(word): comma = "," if word.endswith(",") else "" return "`%s`%s" % (wor
Docs: bulk add backticks to .seealso man page fields```pythonimport osimport reimport fileinputdef _process_word(word): comma = "," if word.endswith(",") else "" return "`%s`%s" % (word.rstrip(","), comma)def _process_stripped_line(line): return " ".join(map(_process_word, line.split()))start_pattern = re.compile(r"^( *\.seealso:? )(.*$)")def process_file(filename_full): with fileinput.FileInput(filename_full, inplace=True) as f: in_block = False for line in f: line_stripped = line.strip() # end ".seealso blocks" on a blank line or C-style comment close line_modified = None if not line_stripped: in_block = False elif line_stripped.endswith("*/"): in_block = False else: match = re.match(start_pattern, line) # not stripped line if match: indent = " " * len(match.group(1)) in_block = True line_modified = match.group( 1) + _process_stripped_line( match.group(2).strip()) elif in_block: line_modified = indent + _process_stripped_line( line_stripped) if line_modified: print(line_modified) # prints to the file else: print(line, end="") # prints to the fileBASE_DIRS = ["src", "include"]EXT = [".c", ".cxx", ".cpp", ".cu", ".h", ".hpp", ".hxx"]EXCLUDE_DIRS = ["tests", "tutorials", "ftn-auto", "ftn-custom", "benchmarks"]def main(): """ Process everything """ for base in BASE_DIRS: for root, dirs, files in os.walk(base): for filename in files: if os.path.splitext(filename)[1] in EXT: filename_full = os.path.join(root, filename) print("FILE ---", filename_full) process_file(filename_full) for exclude_dir in EXCLUDE_DIRS: if exclude_dir in dirs: dirs.remove(exclude_dir)if __name__ == "__main__": main()```
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
rename PetscAssert() -> PetscCheck() and PetscAssertDebug() -> PetscAssert()
add PetscAssert() and PetscAssertFalse()
SETERRQ[1-9]+ begone
applied attribute format fixes to mat headers
MATSEQAIJVIENNACL: implement MatSeqAIJ{Get,Restore}Array{Read,Write}
Prevent unsafe setting of inode.use to true in MatBindToCPU() for cuSPARSE and ViennaCL matrices.This fixes an issue caused by Stefano's commit c58ef05e, "MatInode: set it tofalse when using devic
Prevent unsafe setting of inode.use to true in MatBindToCPU() for cuSPARSE and ViennaCL matrices.This fixes an issue caused by Stefano's commit c58ef05e, "MatInode: set it tofalse when using device matrices", which introduced flipping the inode.use flaginside MatBindToCPU_SeqAIJCUSPARSE() and MatBindToCPU_SeqAIJViennaCL(). I havefound cases in which this would cause "Corrupted Petsc object, Missing InodeStructure" errors. Only flipping inode.use to true if inode.size is nonzeroeliminates these errors.
Some missing CHKERR[Q|MPI]
Remove all double blank lines from sourceCommit-type: petsc-style/2h
MatInode: set it to false when using device matrices
Merge remote-tracking branch 'origin/maint'
MATSEQAIJVIENNACL: call Vec implementations in matvecs
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:
Single petscdir.mk
build: add more support for not needing to set PETSC_DIR yet build with PETSc, also support for GNU make to directly use "make test" instead of "make -f gmakefile.test"Still needs -include ../petsc
build: add more support for not needing to set PETSC_DIR yet build with PETSc, also support for GNU make to directly use "make test" instead of "make -f gmakefile.test"Still needs -include ../petscdir.mk in many of the makefilesStill needs the link for ../petscdir.mk in many directoriesGNUMakefile: call legacy makefile recursively instead of including itGNUMakefile: promote default "all" target; "libs" builds libpetsc*GNUMakefile: If gnumake < 4.2 prefer makefile wrapper interface over direct gmakefile interface to avoid the following warningsgmakefile.test:92: arch-ci-linux-cxx-cmplx-pkgs-64idx/tests/testfiles: No such file or directorygmakefile:67: arch-ci-linux-cxx-cmplx-pkgs-64idx/lib/petsc/conf/files: No such file or directoryCommit-type: testing-fix, feature, usabilityThanks-to: Jed Brown jed@jedbrown.org
This branch reorganizes the API of mat-mat operations: A*B, At*B, A*Bt, PtAP, RARt, A*B*C- See matproduct.c for detailed description of new API- removed API function XXXSymbolic() and XXXNumeric()
This branch reorganizes the API of mat-mat operations: A*B, At*B, A*Bt, PtAP, RARt, A*B*C- See matproduct.c for detailed description of new API- removed API function XXXSymbolic() and XXXNumeric()- removed subroutines MatMatMult_xxx, MatPtAP_xxx, ...- modified MatxxxSymbolic_XXX() prototype (product is an input now)- selection of algorithm is in MatProductSetFromOptions_xxx()
Rename "pintocpu" in VecOps and MatOps to "bindtocpu".This change should have been made in the commit that changed XXXPinToCPU()to XXXBindToCPU(), but it was overlooked.
Changed XXXPinToCPU() to XXXBindToCPU() to prevent confusion.The reason for this change is that we already use the terminology"pinned" to refer to memory that is non-pageable, in the context ofPe
Changed XXXPinToCPU() to XXXBindToCPU() to prevent confusion.The reason for this change is that we already use the terminology"pinned" to refer to memory that is non-pageable, in the context ofPetscSF as well as allocating host memory when GPUs are being employed.
General PETSc fixes* make generatefortranstubs.py handle .cxx* bump HPDDM version + minor hypre cleaning
Add logic setting offloadmask for sequential matrices in the MPIAIJ code that mimicks logic in MatSetValues_SeqAIJ().
12345