[petsc-dev] ISLocalToGlobalMappingGetInfo

Pierre Jolivet pierre.jolivet at enseeiht.fr
Fri Aug 9 03:06:43 CDT 2019


Nevermind, the first component of the arrays are too frequently used in PCBDDC.
So, I guess, the documentation should be updated by someone who knows what is stored there.

Also, it’s not clear to me what would happened with a domain decomposition with only non-connected subdomains.
If there are more than a single subdomain, is nproc = 1 or 0 like when there is a single subdomain? Cf. https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1012 <https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1012>.

Thanks anyway,
Pierre

> On 9 Aug 2019, at 9:35 AM, Pierre Jolivet via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> 
> Actually, I don’t think it is a bug, but rather an undocumented feature.
> Someone clearly knew what they were doing when writing this: https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1379 <https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1379>
> Now, the question becomes: is this really needed? Can’t the values associated to "rank" be stripped from the arrays from the get go?
> I’m guessing this also explains why some loop start at 1 and not 0, e.g., https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1583 <https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/utils/isltog.c.html#line1583>
> 
> 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.
> 
> Thanks,
> Pierre
> 
>> On 9 Aug 2019, at 8:52 AM, Smith, Barry F. <bsmith at mcs.anl.gov <mailto:bsmith at mcs.anl.gov>> wrote:
>> 
>> 
>>  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.
>> 
>>  Barry
>> 
>> 
>>> On Aug 9, 2019, at 12:37 AM, Pierre Jolivet <pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> wrote:
>>> 
>>> Again, with only 2 processes, where nproc is set to 2, I get the following numprocs and indices arrays on rank 0:
>>> 0	110 111 112 113 114 115 116 117 … 
>>> 1	110 111 112 113 114 115 116 117 …
>>> Are these the expected values? If so, what is the true definition of nproc, please?
>>> 
>>> Thanks,
>>> Pierre
>>> 
>>>> On 9 Aug 2019, at 3:45 AM, Smith, Barry F. <bsmith at mcs.anl.gov <mailto:bsmith at mcs.anl.gov>> wrote:
>>>> 
>>>> 
>>>> 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.
>>>> 
>>>> Barry
>>>> 
>>>> 
>>>>> On Aug 8, 2019, at 9:39 AM, Pierre Jolivet via petsc-dev <petsc-dev at mcs.anl.gov <mailto:petsc-dev at mcs.anl.gov>> wrote:
>>>>> 
>>>>> Hello,
>>>>> 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:
>>>>> - with 1 process: 0
>>>>> - with 2 processes: 2
>>>>> In the source code, it says that nproc is the “number of processors that are connected to this one”.
>>>>> How come this value is equal to the size of the global communicator when using 2 processes?
>>>>> According to the comment in the source code, shouldn’t the returned value be 1?
>>>>> 
>>>>> Thanks,
>>>>> Pierre
>>>> 
>>> 
>> 
> 

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


More information about the petsc-dev mailing list