<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 9, 2019, at 10:06 AM, Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" class="">petsc-dev@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Nevermind, the first component of the arrays are too frequently used in PCBDDC.<div class="">So, I guess, the documentation should be updated by someone who knows what is stored there.</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>The documentation is wrong. You can find better information on ISLocalToGlobalMappingGetInfo here<div class=""><a href="https://bitbucket.org/petsc/petsc/src/4dca3327524fa2afc3caa7721b48fed838417d43/src/ksp/pc/impls/is/pcis.h#lines-58" class="">https://bitbucket.org/petsc/petsc/src/4dca3327524fa2afc3caa7721b48fed838417d43/src/ksp/pc/impls/is/pcis.h#lines-58</a></div><div class=""><br class=""></div></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Also, it’s not clear to me what would happened with a domain decomposition with only non-connected subdomains.</div><div class="">If there are more than a single subdomain, is nproc = 1 or 0 like when there is a single subdomain? Cf. <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1012" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1012</a>.</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>The ISL2G code does not use any information about connectivity. It only returns the sharing information of local indices.</div><div><br class=""></div><div>BTW,  I think returning 0 when sizeofcomm is 1 is an inconsistency (it should return 1)</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Thanks anyway,</div><div class="">Pierre<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 9 Aug 2019, at 9:35 AM, Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" class="">petsc-dev@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Actually, I don’t think it is a bug, but rather an undocumented feature.<div class="">Someone clearly knew what they were doing when writing this: <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1379" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1379</a></div><div class="">Now, the question becomes: is this really needed? Can’t the values associated to "rank" be stripped from the arrays from the get go?</div><div class="">I’m guessing this also explains why some loop start at 1 and not 0, e.g., <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1583" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1583</a></div><div class=""><br class=""></div><div class="">I’ll try to take a crack at it, anyway, now I know that the information I’m looking for is basically all the arrays shifted by 1 and nproc = nproc - 1.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Pierre</div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 9 Aug 2019, at 8:52 AM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">  The documents and the code indicate that nproc should be 1 in this case. So there is a bug, if you are unable to determine the cause I can try to look at it but have stones of things to do.<br class=""><br class="">  Barry<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Aug 9, 2019, at 12:37 AM, Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr" class="">pierre.jolivet@enseeiht.fr</a>> wrote:<br class=""><br class="">Again, with only 2 processes, where nproc is set to 2, I get the following numprocs and indices arrays on rank 0:<br class="">0<span class="Apple-tab-span" style="white-space:pre">    </span>110 111 112 113 114 115 116 117 … <br class="">1<span class="Apple-tab-span" style="white-space:pre">  </span>110 111 112 113 114 115 116 117 …<br class="">Are these the expected values? If so, what is the true definition of nproc, please?<br class=""><br class="">Thanks,<br class="">Pierre<br class=""><br class=""><blockquote type="cite" class="">On 9 Aug 2019, at 3:45 AM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:<br class=""><br class=""><br class="">There could be a bug. Perhaps check the entries for that "extra" connection, are they all actual meaningful connections. The code that fills up these data structures is somewhat involved.<br class=""><br class=""> Barry<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Aug 8, 2019, at 9:39 AM, Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" class="">petsc-dev@mcs.anl.gov</a>> wrote:<br class=""><br class="">Hello,<br class="">When I use ISLocalToGlobalMappingGetInfo, e.g., in src/ksp/ksp/examples/tutorials/ex71.c ISLocalToGlobalMappingGetInfo(map, &nproc, &procs, &numprocs, &indices), I get the following value for nproc:<br class="">- with 1 process: 0<br class="">- with 2 processes: 2<br class="">In the source code, it says that nproc is the “number of processors that are connected to this one”.<br class="">How come this value is equal to the size of the global communicator when using 2 processes?<br class="">According to the comment in the source code, shouldn’t the returned value be 1?<br class=""><br class="">Thanks,<br class="">Pierre<br class=""></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>