<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Pierre and Stefano,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
                                          Yes - that is it!  I had just stumbled onto that
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
point as your email arrived thanks to Stefano's guidance, which suggested the problem was that the routine
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
was receiving an integer when it was expecting something else... then a lightbulb
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 finally switched on and I finally remembered that I needed to add the error variable</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 as a final argument. I thought it was something silly on my part, and I wasn't mistaken
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
there at least!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
      Many thanks to both of you,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
                best wishes,<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
                             Dan.<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Pierre Seize <pierre.seize@onera.fr><br>
<b>Sent:</b> Friday, April 9, 2021 10:14 AM<br>
<b>To:</b> Stefano Zampini <stefano.zampini@gmail.com>; dazza simplythebest <sayosale@hotmail.com><br>
<b>Cc:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<p>Hello, I think you forgot to pass <tt>ierr</tt> as the last argument of <tt>PetscIntView</tt>.</p>
<p>Pierre<br>
</p>
<br>
<div class="x_moz-cite-prefix">On 09/04/21 11:52, Stefano Zampini wrote:<br>
</div>
<blockquote type="cite">
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883== Invalid write of size 4</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883==    at 0x503E784: petscintview_ (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==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)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883==    by 0x402465: MAIN__ (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:40)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883==    by 0x402221: main (in /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/trashy.exe)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883==  Address 0x0 is not stack'd, malloc'd or (recently) free'd</div>
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">==841883== </span>
<div class=""><font class="" size="3" face="Calibri, Helvetica,
          sans-serif"><br class="">
</font></div>
<div class=""><font class="" size="3" face="Calibri, Helvetica,
          sans-serif">This exactly points to the error and suggests you to take a look at </font><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c,
 line 109</span></div>
<div class=""><font class="" face="Calibri, Helvetica, sans-serif"><font class="" size="3">You are trying to write 4 bytes (most probably an int) where is not allowed.<br class="">
</font></font>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Apr 9, 2021, at 12:32 PM, dazza simplythebest <<a href="mailto:sayosale@hotmail.com" class="">sayosale@hotmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==841883== Invalid write of size 4</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==841883==    at 0x503E784: petscintview_ (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==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)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==841883==    by 0x402465: MAIN__ (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:40)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==841883==    by 0x402221: main (in /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/trashy.exe)</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
==841883==  Address 0x0 is not stack'd, malloc'd or (recently) free'd</div>
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:16px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">==841883==<span class="x_Apple-converted-space"> </span></span></div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
</div>
</div>
</body>
</html>