[petsc-dev] bug in ISGlobalToLocalMappingApply

Barry Smith bsmith at mcs.anl.gov
Thu Feb 12 16:25:45 CST 2015


  Merged into next for testing as barry/fix-isltogmappingapplybs

  Thanks

  Barry

> On Feb 12, 2015, at 3:30 AM, Stefano Zampini <stefano.zampini at gmail.com> wrote:
> 
> Me and Lisandro just found a bug in the current implementation of ISGlobalToLocalMappingApply when bs>1. Please find attached a patch with a possible fix.
> 
> The issue is related with the convention used for the computation of the largest index in global ordering. In ISGlobalToLocalMappingSetUp_Private "end" is the largest index in global ordering, so the couple "start,end" defines a closed interval.
> 
> When it comes to map from global to local in ISGlobalToLocalMappingApply, indices larger the bs*end are not mapped back to local ordering, and thus the last bs-1 global indices are not mapped back.
> 
> Another possible fix would consist in changing the convention used for the computation of "end" (say, as the interval [start,end), more C friendly), but it will require more changes to the code, and maybe affect other part of the code where the private data of the ISLocalToGlobalMapping object is directly used.
> 
> -- 
> Stefano
> <patch_isltog>




More information about the petsc-dev mailing list