[petsc-users] Check Array and String Bounds in PETSc
Danyang Su
danyang.su at gmail.com
Mon Oct 20 11:56:39 CDT 2014
On 19/10/2014 5:06 PM, Barry Smith wrote:
> Use ISLocalToGlobalMappingGetIndicesF90()
Hi Barry,
Would you please give my a brief introduction or example on the
parameters for this function? I didn't find it in the PETSc manual page.
The following codes will cause stack overflow. Maybe the idx data type
is wrong here. Would you please let me know what data type should be
used here?
PetscInt, pointer :: idx(:)
call DMGetLocalToGlobalMapping(dmda_flow%da,ltogm,ierr)
call ISLocalToGlobalMappingGetIndicesF90(ltogm,idx,ierr)
Thanks,
Danyang
>
>
>> On 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?
>>
>> Thanks,
>>
>> Danyang
More information about the petsc-users
mailing list