Skip to content
Snippets Groups Projects
  1. Mar 07, 2024
    • Pierre Jolivet's avatar
      Remove multiple parentheses and extra semicolon · f4f49eea
      Pierre Jolivet authored
      git grep -l -E "\(\([a-zA-Z0-9_]+\)\(\*[a-zA-Z0-9_]+\)[, )]" | xargs sed -r -i'' 's#\(\(([a-zA-Z0-9_]+)\)\(\*([a-zA-Z0-9_]+)\)([, )])#\(\(\1\)\*\2\3#g'
      git grep -l -E "Petsc(.)*\(\(\*[a-zA-Z0-9_]*\)," | xargs sed -r -i'' 's#Petsc([a-zA-Z0-9_]*)\(\(\*([a-zA-Z0-9_]*)\), #Petsc\1(*\2, #g'
      git grep -l -E "([\!\&\~\*\(]|\)\)|\([^,\*\(]+\**\))\(([a-zA-Z0-9_]+((\.|->)[a-zA-Z0-9_]+|\[[a-zA-Z0-9_ \%\+\*\-]+\])+)\)" | xargs sed -r -i'' 's#([\!\&\~\*\(]|\)\)|\([^,\*\(]+\**\))\(([a-zA-Z0-9_]+((\.|->)[a-zA-Z0-9_]+|\[[a-zA-Z0-9_ \%\+\*\-]+\])+)\)#\1\2#g'
      f4f49eea
  2. Feb 09, 2024
  3. Feb 02, 2023
  4. Sep 21, 2022
  5. Aug 29, 2022
  6. Aug 22, 2022
  7. Jul 23, 2022
    • Barry Smith's avatar
      Add PetscFunctionBeginUser to all PETSc C/C++ examples · 327415f7
      Barry Smith authored
      Now the stack frames will contain the main program and the correct line numbers in them
      
      git ls-files | egrep "(tutorials|tests)" | xargs sed -i  "s?\(PetscCall(PetscInitialize(&argc\)?PetscFunctionBeginUser;\n  \1?g"
      
      Commit-type: error-checking, testing-fix
      /spend 15m
      327415f7
  8. Jun 23, 2022
    • Barry Smith's avatar
      Change if () { PetscCall() } three liner and friends to one liners · 1baa6e33
      Barry Smith authored and Satish Balay's avatar Satish Balay committed
      for 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  ; done
      
      Yes, really ugly but Barry still cannot master awk
      
      Commit-type: housekeeping
      1baa6e33
  9. Jun 10, 2022
  10. Apr 14, 2022
  11. Apr 06, 2022
    • Patrick Sanan's avatar
      Docs: remove "Concepts:" and related comments in /*T .. T*/ blocks · 1bb3edfd
      Patrick Sanan authored
      Remove all \*T ... comment blocks with e.g.
      
         cd src && find . -type f -exec sed -i '/^[! ] *\/\*T$/,/^[! ]*T\*\/$/d' {} \;
      
      Clean up resulting double blank lines with e.g.
      
         cd src &&  find . type f \( -name "*.c" -o -name "*.cxx" -o -name "*.F" -o -name "*.F90" \) -exec sh -c "cat -s {} > tmp && mv tmp {}" \;
      
      Manually revert those changes from the vendored code (src/sys/yaml)
      
      Manually restore a few comments from these blocks.
      
      Manually remove "Concepts:" and "Processors:" comments from files
      which have these outside of "\*T" blocks automatically deleted above.
      1bb3edfd
  12. Mar 26, 2022
    • Jacob Faibussowitsch's avatar
      The great renaming: · 9566063d
      Jacob Faibussowitsch authored
      - 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()
      9566063d
  13. Mar 25, 2022
  14. Mar 20, 2022
  15. Feb 16, 2022
  16. Feb 13, 2022
  17. Oct 18, 2021
  18. Jun 21, 2021
  19. Jun 04, 2021
  20. May 24, 2021
  21. Dec 30, 2020
    • Barry Smith's avatar
      Convert MPI error type to PETSc error with string message for all MPI calls · ffc4695b
      Barry Smith authored and Satish Balay's avatar Satish Balay committed
      Now PETSc examples will ONLY return PETSc error codes and never MPI error codes directly so we can understand and post-process their
         errors better.
      
      The test harness will now automatically retry tests that fail with MPI, this may help with Intel MPI that produces
         seemingly random failures.
      
      Commit-type: error-checking
      /spend 30m
      ffc4695b
  22. Aug 25, 2020
  23. Jul 19, 2020
  24. Mar 18, 2020
    • Jed Brown's avatar
      Promote examples/{tests,tutorials}/ to {tests,tutorials}/ · c4762a1b
      Jed Brown authored
      This shortens paths and improves consistency between test target names
      and paths to the source and output files.  Most of the work was
      completed by this script, followed by mild cleanup of nonconforming
      cases.
      
      for makefile in `git ls-files 'src/*makefile'`; do
          if rg -q 'DIRS.*\bexamples\b' $makefile; then
              base=$(dirname $makefile)
              dirs=$(cd $base/examples && ls -d tests tutorials 2>/dev/null | xargs echo)
              perl -pi -e "s#^(DIRS.*)\bexamples\b#\1${dirs}#" $makefile
              git rm $base/examples/makefile
              for t in $dirs; do
                  git mv $base/examples/$t $base/
                  perl -pi -e "s#^(LOCDIR[[:space:]]*=).*#\1 $base/$t/#" $base/$t
              done
          fi
      done
      
      git grep -l -E -z 'examples/(tutorials|tests)' | xargs -0 perl -pi -e 's#examples/(tutorials|tests)#\1#g'
      git checkout @ \
          src/docs/website/documentation/changes/ \
          src/benchmarks/results/
      c4762a1b
  25. Oct 17, 2019
  26. Jun 28, 2018
  27. Apr 27, 2018
  28. Apr 26, 2018
  29. Dec 22, 2017
  30. Oct 22, 2017
  31. Dec 21, 2016
  32. May 08, 2016
  33. Apr 22, 2016
  34. Apr 11, 2016
  35. Nov 02, 2015
  36. Oct 04, 2015
Loading