<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> I have submitted a MR that adds a Fortran interface for these functions so it will automatically error at compile time if you do not include the appropriate arguments.<div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 9, 2021, at 5:35 AM, dazza simplythebest <<a href="mailto:sayosale@hotmail.com" class="">sayosale@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Dear Pierre and Stefano,</div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> Yes - that is it! I had just stumbled onto that<span class="Apple-converted-space"> </span><br class=""></div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">point as your email arrived thanks to Stefano's guidance, which suggested the problem was that the routine<span class="Apple-converted-space"> </span><br class=""></div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">was receiving an integer when it was expecting something else... then a lightbulb<span class="Apple-converted-space"> </span><br class=""></div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> finally switched on and I finally remembered that I needed to add the error variable</div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> as a final argument. I thought it was something silly on my part, and I wasn't mistaken<span class="Apple-converted-space"> </span><br class=""></div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">there at least!</div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> Many thanks to both of you,</div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> best wishes,<br class=""></div><div style="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; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""> Dan.<br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; 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; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div id="appendonsend" class=""></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><hr tabindex="-1" style="display: inline-block; width: 1200.5px;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Pierre Seize <<a href="mailto:pierre.seize@onera.fr" class="">pierre.seize@onera.fr</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, April 9, 2021 10:14 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" class="">stefano.zampini@gmail.com</a>>; dazza simplythebest <<a href="mailto:sayosale@hotmail.com" class="">sayosale@hotmail.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application</font><div class=""> </div></div><div style="background-color: rgb(255, 255, 255);" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hello, I think you forgot to pass<span class="Apple-converted-space"> </span><tt class="">ierr</tt><span class="Apple-converted-space"> </span>as the last argument of<span class="Apple-converted-space"> </span><tt class="">PetscIntView</tt>.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Pierre<br class=""></div><br class=""><div class="x_moz-cite-prefix">On 09/04/21 11:52, Stefano Zampini wrote:<br class=""></div><blockquote type="cite" class=""><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 class=""><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></div></blockquote></div></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>