[petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application

Pierre Seize pierre.seize at onera.fr
Fri Apr 9 05:14:46 CDT 2021


Hello, I think you forgot to pass ierr as the last argument of PetscIntView.

Pierre


On 09/04/21 11:52, Stefano Zampini wrote:
> ==841883== Invalid write of size 4
> ==841883==    at 0x503E784: petscintview_ 
> (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109)
> ==841883==    by 0x40262C: 
> all_stab_routines_mp_write_rows_to_petsc_matrix_ 
> (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:17)
> ==841883==    by 0x402465: MAIN__ 
> (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:40)
> ==841883==    by 0x402221: main (in 
> /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/trashy.exe)
> ==841883==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==841883==
>
> This exactly points to the error and suggests you to take a look at 
> /data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c, 
> line 109
> You are trying to write 4 bytes (most probably an int) where is not 
> allowed.
>
>> On Apr 9, 2021, at 12:32 PM, dazza simplythebest 
>> <sayosale at hotmail.com <mailto:sayosale at hotmail.com>> wrote:
>>
>> ==841883== Invalid write of size 4
>> ==841883==    at 0x503E784: petscintview_ 
>> (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109)
>> ==841883==    by 0x40262C: 
>> all_stab_routines_mp_write_rows_to_petsc_matrix_ 
>> (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:17)
>> ==841883==    by 0x402465: MAIN__ 
>> (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:40)
>> ==841883==    by 0x402221: main (in 
>> /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/trashy.exe)
>> ==841883==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
>> ==841883==
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210409/98465548/attachment.html>


More information about the petsc-users mailing list