<div dir="ltr"><div dir="ltr">On Sun, Jan 17, 2021 at 1:28 PM Roland Richter <<a href="mailto:roland.richter@ntnu.no">roland.richter@ntnu.no</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Dear all,</p>
<p>I am currently encountering issues in my program when calling
MatDiagonalScale(matrix, NULL, vector) in an MPI-context for at
least two threads. The backtrace from gdb (and the error output)
tells me that the problem lies apparently in
PetscSFBcastAndOpBegin(), with the exact error listed as <i>petsc/src/vec/is/sf/interface/sf.c
Wrong type of object: Parameter # 1 <br>
</i></p>
<p></p></div></blockquote><div>1) Always send the entire error trace</div><div><br></div><div>2) You are using right scaling, so it would use the matvec scatter internally. If MatSetUp() has not been called, this scatter will not have<br></div><div> been created. I think we are missing a check here that the matrix is setup.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>When printing the involved matrix and vector, everything looks as
expected (the matrix is split over the processes equally with
continuous rows, the vector is distributed over both processes).</p>
<p>Is the issue that my vector is distributed over several
processes? Or is there another issue I am not seeing here?</p>
<p>I tried to narrow the problem down by writing a MWE, but was not
able to reproduce it in a smaller scale. Therefore, are there
other approaches I could try, too?</p>
<p>Thanks!</p>
<p>Regards,</p>
<p>Roland Richter<br>
</p>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>