Re: [petsc-users] Why PetscDestroy global collective semantics?

2021-10-22 Thread Jed Brown
Junchao Zhang writes: > On Fri, Oct 22, 2021 at 9:13 PM Barry Smith wrote: > >> >> One technical reason is that PetscHeaderDestroy_Private() may call >> PetscCommDestroy() which may call MPI_Comm_free() which is defined by the >> standard to be collective. Though PETSc tries to limit its use

Re: [petsc-users] Why PetscDestroy global collective semantics?

2021-10-22 Thread Junchao Zhang
On Fri, Oct 22, 2021 at 9:13 PM Barry Smith wrote: > > One technical reason is that PetscHeaderDestroy_Private() may call > PetscCommDestroy() which may call MPI_Comm_free() which is defined by the > standard to be collective. Though PETSc tries to limit its use of new MPI > communicators (for

Re: [petsc-users] Why PetscDestroy global collective semantics?

2021-10-22 Thread Barry Smith
One technical reason is that PetscHeaderDestroy_Private() may call PetscCommDestroy() which may call MPI_Comm_free() which is defined by the standard to be collective. Though PETSc tries to limit its use of new MPI communicators (for example generally many objects shared the same

[petsc-users] Why PetscDestroy global collective semantics?

2021-10-22 Thread Alberto F . Martín
Dear PETSc users, What is the main reason underlying PetscDestroy subroutines having global collective semantics? Is this actually true for all PETSc objects? Can this be relaxed/deactivated by, e.g., compilation macros/configuration options? Thanks in advance! Best regards,  Alberto.