[petsc-users] Check Array and String Bounds in PETSc

Matthew Knepley knepley at gmail.com
Sun Oct 19 18:48:51 CDT 2014


On Sun, Oct 19, 2014 at 6:38 PM, Danyang Su <danyang.su at gmail.com> wrote:

> Hi All,
>
> How can I avoid "array bounds" error when using PETSc. I have to debug my
> codes so I compiled the codes with option "Check Array and String Bounds".
> But  this results into array bounds error when I need to use ltog, as shown
> below.
>         call DMGetLocalToGlobalMapping(dmda_flow%da,ltogm,ierr)
>         call ISLocalToGlobalMappingGetIndices(ltogm,ltog,idltog,ierr)
> Exactly the aforementioned two lines work fine and the bug is in somewhere
> else. But the debug process just stops at the codes when ltog is used. How
> can avoid this?
>

Something else is wrong with the code. Neither of those routines does array
lookup.

  Matt


> Thanks,
>
> Danyang
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141019/5093bc5f/attachment.html>


More information about the petsc-users mailing list