[petsc-dev] Can I call PetscSectionAddDof(s, p, ndof) at a shred 'p' by more than one processors?

Zhang, Hong hzhang at mcs.anl.gov
Wed Nov 18 09:26:05 CST 2020


Matt or Jed,
Can I call PetscSectionAddDof(s,p,ndof) at a shred 'p' by more than one processors? For example,
if (rank == 0) {
    PetscSectionAddDof(s,p,1) ;
} else if (rank == 1) {
    PetscSectionAddDof(s,p,2) ;
}
Then, at shared 'p', section 's' has dof=3?

I did a test, and got an error
petsc/src/ksp/ksp/tutorials/network (hzhang/dmnetwork-netcoupling *=)
mpiexec -n 2 ./ex4

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Global dof 2 for point 3 is not the unconstrained 1
...
[0]PETSC ERROR: #1 PetscSectionCreateGlobalSection() line 1297 in /Users/hongzhang-sun/soft/petsc/src/vec/is/section/interface/section.c
[0]PETSC ERROR: #2 DMGetGlobalSection() line 4367 in /Users/hongzhang-sun/soft/petsc/src/dm/interface/dm.c
[0]PETSC ERROR: #3 DMSetUp_Network() line 2187 in /Users/hongzhang-sun/soft/petsc/src/dm/impls/network/network.c
[0]PETSC ERROR: #4 DMSetUp() line 788 in /Users/hongzhang-sun/soft/petsc/src/dm/interface/dm.c
[0]PETSC ERROR: #5 main() line 132 in ex4.c

Another question: can I find the processor ownership of a section point?

Hong

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20201118/c1cb263a/attachment.html>


More information about the petsc-dev mailing list