<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Petsc developer:           </div><div dir="ltr">Hi,</div><div dir="ltr">            </div><div dir="ltr">I've been studying Petsc recently about Precontioner and Metrix-Free, and I have some questions that puzzle me.    </div><div dir="ltr">     </div><div dir="ltr">1. I want to test block Jacobi preconditioner, so I chose /snes/example/tutorial/ex3.c as an example. According to the reference in the example, the input parameters are:            </div><div dir="ltr">mpiexec -n 8./ex3 -nox -n 10000 -ksp_type fgmres -pc_type bjacobi  -pc_bjacobi_blocks 4 -sub_ksp_type gmres -sub_ksp_max_it 3 -post_setsubksp  -sub_ksp_rtol 1.e-16            </div><div dir="ltr">I want to export each block of KSP and PC information :          </div><div dir="ltr">  -snes_view -ksp_view            </div><div dir="ltr">However, the procedure is wrong and the wrong information is as follows:  </div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>    <font size="1">   <span style="font-family:等线;text-align:justify">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></font></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: Different communicators in the two objects: Argument # 1 and 2 flag 3</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[3]PETSC ERROR: Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[3]PETSC ERROR: [6]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[6]PETSC ERROR: Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[6]PETSC ERROR: Different communicators in the two objects: Argument # 1 and 2 flag 3</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[6]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[7]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[7]PETSC ERROR: Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[7]PETSC ERROR: Different communicators in the two objects: Argument # 1 and 2 flag 3</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[7]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[7]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: ./ex3 on a arch-linux2-c-debug named yjwu-XPS-8910 by yjwu Mon Oct  8 22:35:34 2018</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: #1 KSPView() line 118 in /home/yjwu/petsc-3.10.1/src/ksp/ksp/interface/itcreate.c</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: #2 PCView_BJacobi() line 232 in /home/yjwu/petsc-3.10.1/src/ksp/pc/impls/bjacobi/bjacobi.c</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[0]PETSC ERROR: #3 PCView() line 1651 in /home/yjwu/petsc-3.10.1/src/ksp/pc/interface/precon.c</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: Different communicators in the two objects: Argument # 1 and 2 flag 3</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: ./ex3 on a arch-linux2-c-debug named yjwu-XPS-8910 by yjwu Mon Oct  8 22:35:34 2018</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[1]PETSC ERROR: #1 KSPView() line 118 in /home/yjwu/petsc-3.10.1/src/ksp/ksp/interface/itcreate.c</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">Arguments must have same communicators</span></div><div><span style="font-family:等线;font-size:x-small;text-align:justify">[2]PETSC ERROR: Different communicators in the two objects: Argument # 1 and 2 flag 3</span></div><div><font size="1"><span style="font-family:等线;text-align:justify">[2]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span>   </font></div></blockquote><p class="gmail-15" align="justify" style="text-align:justify"><font size="1"><span style="font-family:等线"></span></font></p><p class="gmail-15" align="justify" style="text-align:justify"><font size="1"><span style="font-family:等线"></span></font></p><div dir="ltr">If I want to get the information of KSP and PC in each block, what should I do?            </div><div dir="ltr"><br></div><div dir="ltr">2. There is a requirement in my program to use Matrix-Free method to approximate Jacobian matrix by finite difference of residual function in solving nonlinear equations. But I'll also provide an analytic( incomplete, some terms are missing or approximate) for preconditioning. Because my problem is about a large set of equations composed of several physical fields, I want to use block Jacobian precondition for each subfield(block), and ILU sub_pc for each subfield. After reading the Users'Guide, I found that using - snex_mf_operator can do the above, so I added:</div><div dir="ltr"> - snes_mf_operator </div><div dir="ltr">after the example above. However, the procedure is wrong and does not seem to support this.   </div><div dir="ltr"> The wrong information is:    </div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>   <font size="1">[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</font></div></div><div><div><font size="1">[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</font></div></div><div><div><font size="1">[2]PETSC ERROR: No support for this operation for this object type</font></div></div><div><div><font size="1">[2]PETSC ERROR: Mat type mffd</font></div></div><div><div><font size="1">[2]PETSC ERROR: [3]PETSC ERROR: [4]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</font></div></div><div><div><font size="1">[4]PETSC ERROR: No support for this operation for this object type</font></div></div><div><div><font size="1">[4]PETSC ERROR: Mat type mffd</font></div></div><div><div><font size="1">[4]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</font></div></div><div><div><font size="1">[4]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018 </font></div></div><div><div><font size="1">[6]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</font></div></div><div><div><font size="1">[6]PETSC ERROR: No support for this operation for this object type</font></div></div><div><div><font size="1">[6]PETSC ERROR: Mat type mffd</font></div></div><div><div><font size="1">[6]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</font></div></div><div><div><font size="1">[6]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018 </font></div></div><div><div><font size="1">[6]PETSC ERROR: ./ex3 on a arch-linux2-c-debug named yjwu-XPS-8910 by yjwu Mon Oct  8 23:01:57 2018</font></div></div><div><div><font size="1">[6]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack</font></div></div><div><div><font size="1">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</font></div></div><div><div><font size="1">[0]PETSC ERROR: No support for this operation for this object type</font></div></div><div><div><font size="1">[0]PETSC ERROR: Mat type mffd</font></div></div><div><div><font size="1">[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</font></div></div><div><div><font size="1">[0]PETSC ERROR: Petsc Release Version 3.10.1, Sep, 26, 2018 </font></div></div><div><div><font size="1">[0]PETSC ERROR: ./ex3 on a arch-linux2-c-debug named yjwu-XPS-8910 by yjwu Mon Oct  8 23:01:57 2018</font></div></div><div><div><font size="1">[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack</font></div></div><div><div><font size="1">[0]PETSC ERROR: #1 MatSetValues() line 1330 in /home/yjwu/petsc-3.10.1/src/mat/interface/matrix.c</font></div></div><div><div><font size="1">[1]PETSC ERROR: No support for this operation for this object type</font></div></div><div><div><font size="1">[1]PETSC ERROR: Mat type mffd</font></div></div><div><div><font size="1">[1]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.     </font></div></div></blockquote><div dir="ltr"><div dir="ltr">If I want to implement matrix-free and block jacobi precondition in my program, what do I need to pay attention or add ?<br></div><div dir="ltr"><br></div><div dir="ltr">The second question is very important for my research and I hope to get your answer. <br></div><div dir="ltr"><br></div><div>Thanks,</div><div>Yingjie</div></div></div></div></div></div></div>