<div dir="ltr"><div dir="ltr">On Sun, Aug 20, 2023 at 6:48 AM Sanjay Govindjee <<a href="mailto:s_g@berkeley.edu">s_g@berkeley.edu</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>
I recently got a copy of E.Bueler's petsc book and was converting
the<br>
programs to fortran for my students and have run into a compile
error that<br>
I can not figure out. I comment out the MatSetValues line the code
compiles fine.<br>
<br>
When I run make on vecmatkspf.F90, I get the error:<br>
<blockquote><font face="monospace"> 42 |
PetscCallA(MatSetValues(A,1,i,4,j,aA,INSERT_VALUES,ierr))<br>
|
1<br>
Error: There is no specific subroutine for the generic
'matsetvalues' at (1)</font><br>
</blockquote>
</div></blockquote><div>Your 'i' is a PetscInt, whereas it should be an array like 'j'.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>My petsc set works, runs with my FEA code and compiles and runs the
fortran<br>
programs in the petsc tutorials directories just fine. And in
particular, compiles<br>
and runs the C versions from Bueler.<br>
<br>
I've attached the make file and the source. I must be doing
something obviously wrong but I can not spot it.<br>
<br>
-sanjay<br>
<pre cols="72">--
</pre>
</div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>