Add automatic generated fortran support for setting and returning contextsMajor cleanup of the code for setting and returning application (previously called user) contexts - PetscCtx ctx is now t
Add automatic generated fortran support for setting and returning contextsMajor cleanup of the code for setting and returning application (previously called user) contexts - PetscCtx ctx is now the standard for passing in contexts - PetscCtxRt ctx is the standard for passing out contexts, including context destroy routines based on PetscCtxDestroyFnBoth of these are typedef to void*Also removed most use of user and userctx for context arguments now consistently named ctxImproved documentation on PetscCtx and PetscCtxRt and on how to use contexts (including getting them) from Fortran
show more ...
checkbadSource: enforce proper style in makefiles
Fix -Wshorten-64-to-32
PetscPartitioner: add multistage partitioner
missing "s" for isascii and issundials
checkbadSource: forbid empty output_file not named output/empty.out
Fortran 90: fully embrace After 34 years!- deprecate use of 'F90' in Fortran function names- use Fortran pointers when appropriate- the new Fortran API is not backward compatible with previous ve
Fortran 90: fully embrace After 34 years!- deprecate use of 'F90' in Fortran function names- use Fortran pointers when appropriate- the new Fortran API is not backward compatible with previous versions!- also clean up inconsistent PETSc code detected by new Fortran generation tools- drop use of bfort- automatically generate all the Fortran PETSc objects, enums etc from the include files- generate most of the Fortran interface definitions and functions from the source code- simplify the number and organization of Fortran modulesCo-authored-by: Jose E. Roman <jroman@dsic.upv.es>
Remove useless code
Fix MPIU_* routines to always return MPI error codes and thus be usable with PetscCallMPI()Introduce MPIU_Count to be used when MPI_Count is not available
Add support to MPIU_Allreduce to prevent int overflow with a single integer argument
Add to CI compilers flags '-Wconversion', '-Wno-sign-conversion', '-Wno-float-conversion', '-Wno-implicit-float-conversion']Also fix the code to repository to compile cleanly with these flags in th
Add to CI compilers flags '-Wconversion', '-Wno-sign-conversion', '-Wno-float-conversion', '-Wno-implicit-float-conversion']Also fix the code to repository to compile cleanly with these flags in the CI
Viwering PetscSection displays dof as dim in the ASCII files, fix to dof
The use case of PetscOptionsGetViewer() has evolved to no longer be the get/restore modelHence the code needs to be refactoredIntroduce PetscCallNull() and PetscCallMPINull() to simplify PETSC_VI
The use case of PetscOptionsGetViewer() has evolved to no longer be the get/restore modelHence the code needs to be refactoredIntroduce PetscCallNull() and PetscCallMPINull() to simplify PETSC_VIEWER_XXXX_() routinesReported-by: James WrightThanks-to: Jeremy L Thompson
This requires some changes to user FORTRAN codePass PETSC_NULL_XXX_ARRAY when passing a NULL as an argument that is expecting an arrayPass PETSC_NULL_ENUM when argument returns an enum instead of
This requires some changes to user FORTRAN codePass PETSC_NULL_XXX_ARRAY when passing a NULL as an argument that is expecting an arrayPass PETSC_NULL_ENUM when argument returns an enum instead of PETSC_NULL_INTEGERPass arrays (and not scalar values) when the argument is expecting an array; this means replace, for example, the argument v with [v]Use PetscObjectIsNull(obj) to check if the object is NULL, instead of obj == PETSC_NULL_XXXThe compiler will now automatically prevent you from using the wrong argument type for the first three bullets aboveThis will also require an update sowing with the new sowing branch this MR is using.
Update to sowing version that supports PetscViewer and PetscObjectRemove manual Fortran stubs for PetscViewer and PetscObject arguments since now handled by sowingAlso handles the passing of null
Update to sowing version that supports PetscViewer and PetscObjectRemove manual Fortran stubs for PetscViewer and PetscObject arguments since now handled by sowingAlso handles the passing of null objects correctly
Update source code removing all unneeded /*@C and associated manual stubs and interfaces
Partitioner: Allow a shell partition to be given from the command line
Partitioner: Support edge weights- They are simple integers in a Section- Appears to work with ParMetis
Docs: fix missing back ticks.
CI: update to clang-format-18
Remove multiple parentheses and extra semicolongit 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
Remove multiple parentheses and extra semicolongit 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'
Merge branch 'barry/2023-12-22/rm-libbase' into 'main'LIBBASE is no longer used in make so remove itSee merge request petsc/petsc!7139
LIBBASE is no longer used in make so remove it
Remove MANSEC from makefiles it is not needed in, tutorials and tests
Fix PetscOptionsGetViewer() so it works in a thread-safe wayWhen PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is sharedby all threads that call PetscOptio
Fix PetscOptionsGetViewer() so it works in a thread-safe wayWhen PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is sharedby all threads that call PetscOptionsGetViewer(). In the previous code PetscObjectReference() anddereference (via PetscViewerDestroy() where called on the viewer by multiple threads after the viewerwas accessed thus corrupting the object.This branch introduces a PetscOptionsRestoreViewer() that allows not doing the referencing and dereferencingon persistant viewers, thus removing the specific race condition above.Other possible solutions includeUse a lock on each PetscObjectReference/Dereference() just in case they are shared. Could be time consuming so onecould mark each object as either threadshared or independent and only do the locks on threadshared objects. This lowersthe cost but would require more extensive changes to PETSc infrastructure. And I do not know if this shared/not shared modelis what we need in the long run, though it might be.
12345