[petsc-users] ISGlobalToLocalMappingApplyBlock

Adrian Croucher a.croucher at auckland.ac.nz
Wed Nov 15 19:39:33 CST 2017


I've debugged into the ISGlobalToLocalMappingApplyBlock() function and 
it seems to me the bounds checking in there is not correct when the 
blocksize is > 1.

It checks against the same bounds, scaled up by the blocksize, in both 
the block and non-block versions of the function. I think for the block 
version the bounds should not be scaled.

I've just created a pull request 
(acroucher/fix-IS-global-to-local-mapping-block) with a suggested fix.

- Adrian


On 16/11/17 11:52, Adrian Croucher wrote:
> I actually attached the wrong test program last time- I've attached 
> the right one here, which is much simpler. It test global indices 0, 
> 1, ... 9.
>
> If I run on 2 processes, the local indices it returns are:
>
> rank 0: 0, 1, 2, 3, 4, 0, 0, 0, -253701943, 0
> rank 1: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
>
> The results I expected are:
>
> rank 0: 0, 1, 2, 3, 4, -1, -1, -1, -1, -1
> rank 1: -1, -1, -1, -1, -1, 0, 1, 2, 3, 4
>
> So the results for global indices 0, 1,... 4 are what I expected, on 
> both ranks. But the results for global indices 5, 6, ... 9 are not.
>
> I tried increasing the blocksize to 3 or 4, and the results were 
> exactly the same.
>
> It only gives the results I expected if I change the blocksize to 1.
>
> - Adrian
>

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611



More information about the petsc-users mailing list