<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Matt or Jed,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can I call PetscSectionAddDof(s,p,ndof) at a shred 'p' by more than one processors? For example,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
if (rank == 0) {</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
    <span style="margin:0px;background-color:white">PetscSectionAddDof(s,p,1)<span style="margin:0px"> ;</span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px">} else if (rank == 1) {</span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px">    <span style="margin:0px;background-color:white">PetscSectionAddDof(s,p,2)</span><span style="margin:0px"> ;</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">} </span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">Then, at shared 'p', section 's' has dof=3?</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px"><br>
</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">I did a test, and got an error</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">petsc/src/ksp/ksp/tutorials/network (hzhang/dmnetwork-netcoupling *=)
<div>mpiexec -n 2 ./ex4</div>
<div><br>
</div>
<div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Invalid argument</div>
<div>[0]PETSC ERROR: Global dof 2 for point 3 is not the unconstrained 1</div>
<div>...</div>
<div>[0]PETSC ERROR: #1 PetscSectionCreateGlobalSection() line 1297 in /Users/hongzhang-sun/soft/petsc/src/vec/is/section/interface/section.c</div>
<div>[0]PETSC ERROR: #2 DMGetGlobalSection() line 4367 in /Users/hongzhang-sun/soft/petsc/src/dm/interface/dm.c</div>
<div>[0]PETSC ERROR: #3 DMSetUp_Network() line 2187 in /Users/hongzhang-sun/soft/petsc/src/dm/impls/network/network.c</div>
<div>[0]PETSC ERROR: #4 DMSetUp() line 788 in /Users/hongzhang-sun/soft/petsc/src/dm/interface/dm.c</div>
[0]PETSC ERROR: #5 main() line 132 in ex4.c<br>
</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px"><br>
</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">Another question: can I find the processor ownership of a section point?</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px"><br>
</span></span></span></div>
<div style="margin:0px;font-size:12pt;color:black;background-color:rgb(255, 255, 255)">
<span style="margin:0px;background-color:white"><span style="margin:0px"><span style="margin:0px">Hong</span></span></span></div>
<br>
</div>
</body>
</html>