Do we ever see a use case where we might have something like:
PETSc.initialize(petsclib)
# ... work....
PETSc.finalize(petsclib)
# start PETSc again...
PETSc.initialize(petsclib)
I ask because this can cause problems with the garbage collector in when it's used. For instance, if the garbage collector is run on a PETSc object allocated in the first chunk of work AFTER petsc has been re-initialized this is an error since the actual PETSc object doesn't exist anymore. The destroy has a check for whether PETSc is finalized, but this will not catch PETSc having been re-initialized.
Do we ever see a use case where we might have something like:
I ask because this can cause problems with the garbage collector in when it's used. For instance, if the garbage collector is run on a PETSc object allocated in the first chunk of work AFTER petsc has been re-initialized this is an error since the actual PETSc object doesn't exist anymore. The
destroyhas a check for whether PETSc is finalized, but this will not catch PETSc having been re-initialized.