| #
be37439e
|
| 21-Oct-2024 |
Satish Balay <balay@mcs.anl.gov> |
Merge branch 'stefanozampini/useless-cast' into 'main'
Remove useless cast
See merge request petsc/petsc!7894
|
| #
300f1712
|
| 05-Oct-2024 |
Stefano Zampini <stefano.zampini@gmail.com> |
brain dead fixes for useless casts in examples
|
| #
fda22ce0
|
| 08-Jul-2024 |
Satish Balay <balay@mcs.anl.gov> |
Merge branch 'barry/2024-07-01/fix-petscoptionsgetviewer' into 'main'
The use case of PetscOptionsGetViewer() has evolved to no longer be the get/restore model
See merge request petsc/petsc!7667
|
| #
648c30bc
|
| 08-Jul-2024 |
Barry Smith <bsmith@mcs.anl.gov> |
The use case of PetscOptionsGetViewer() has evolved to no longer be the get/restore model
Hence the code needs to be refactored
Introduce PetscCallNull() and PetscCallMPINull() to simplify PETSC_VI
The use case of PetscOptionsGetViewer() has evolved to no longer be the get/restore model
Hence the code needs to be refactored
Introduce PetscCallNull() and PetscCallMPINull() to simplify PETSC_VIEWER_XXXX_() routines
Reported-by: James Wright Thanks-to: Jeremy L Thompson
show more ...
|
| #
e6053022
|
| 02-Dec-2023 |
Satish Balay <balay@mcs.anl.gov> |
Merge branch 'barry/2023-11-21/fix-thread-safety-petscoptionsgetviewer' into 'main'
Fix PetscOptionsGetViewer() so it works in a thread-safe way
See merge request petsc/petsc!7047
|
| #
cd791dc2
|
| 21-Nov-2023 |
Barry Smith <bsmith@mcs.anl.gov> |
Fix PetscOptionsGetViewer() so it works in a thread-safe way
When PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is shared by all threads that call PetscOptio
Fix PetscOptionsGetViewer() so it works in a thread-safe way
When PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is shared by all threads that call PetscOptionsGetViewer(). In the previous code PetscObjectReference() and dereference (via PetscViewerDestroy() where called on the viewer by multiple threads after the viewer was accessed thus corrupting the object.
This branch introduces a PetscOptionsRestoreViewer() that allows not doing the referencing and dereferencing on persistant viewers, thus removing the specific race condition above.
Other possible solutions include
Use a lock on each PetscObjectReference/Dereference() just in case they are shared. Could be time consuming so one could mark each object as either threadshared or independent and only do the locks on threadshared objects. This lowers the cost but would require more extensive changes to PETSc infrastructure. And I do not know if this shared/not shared model is what we need in the long run, though it might be.
show more ...
|
| #
6c37f76f
|
| 27-Jul-2023 |
Satish Balay <balay@mcs.anl.gov> |
Merge branch 'tisaac/feature-log-handler' into 'main'
Deglobalize logging into PetscLogHandler and PetscLogState
See merge request petsc/petsc!6709
|
| #
09222b14
|
| 14-Jul-2023 |
Toby Isaac <toby.isaac@gmail.com> |
PetscViewer: Add PetscOptionsGetViewers() for multiple viewers
- Add src/sys/classes/viewer/tests/ex7.c to test this function
|