<div dir="ltr">I just checked, and this is a bug also in maint. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 22 lug 2019 alle ore 13:23 Stefano Zampini via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Junchao,<div><br></div><div>I found an issue with PetscSFReduceBegin/End. It seems that we can no longer do (always worked before)</div><div><br></div><div><div>    ierr = PetscSFReduceBegin(sf,MPIU_INT,leaf,root,MPI_MAX);CHKERRQ(ierr);<br>    ierr = PetscSFReduceBegin(sf,MPIU_INT,leaf2,root2,MPI_MAX);CHKERRQ(ierr);</div><div>    ierr = PetscSFReduceEnd(sf,MPIU_INT,leaf,root,MPI_MAX);CHKERRQ(ierr);<br>    ierr = PetscSFReduceEnd(sf,MPIU_INT,leaf2,root2,MPI_MAX);CHKERRQ(ierr);<br></div><div><br></div><div>You can reproduce with the currrent master</div><div>$ cd $PETSC_DIR/src/ksp/ksp/examples/tutorials</div><div>$ make ex71</div><div>$ mpiexec -n 4  ./ex71 -pde_type Elasticity -cells 7,9 -dim 2 -pc_bddc_levels 1 -pc_bddc_coarsening_ratio 2 -ksp_error_if_not_converged -pc_bddc_monolithic -pc_bddc_use_faces -pc_bddc_coarse_pc_bddc_corner_selection -pc_bddc_coarse_l1_pc_bddc_corner_selection -mat_partitioning_type average  -pc_bddc_coarse_pc_bddc_use_deluxe_scaling -pc_bddc_coarse_sub_schurs_mat_solver_type petsc<br></div><div><br></div><div>The attached patch shows that if we instead do</div><div><br></div><div>    ierr = PetscSFReduceBegin(sf,MPIU_INT,leaf,root,MPI_MAX);CHKERRQ(ierr);</div><div>    ierr = PetscSFReduceEnd(sf,MPIU_INT,leaf,root,MPI_MAX);CHKERRQ(ierr);<br></div><div>    ierr = PetscSFReduceBegin(sf,MPIU_INT,leaf2,root2,MPI_MAX);CHKERRQ(ierr);</div><div>    ierr = PetscSFReduceEnd(sf,MPIU_INT,leaf2,root2,MPI_MAX);CHKERRQ(ierr);<br></div><div><br></div><div>everything works properly. </div>I think the issue is with the SF GetPack mechanism, but I couldn't figure out where.</div><div><br></div><div>-- <br><div dir="ltr" class="gmail-m_2569323882000738569gmail_signature">Stefano</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div>