<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> You are attempting to pass the entire aA array into each MatSetValues() call when you should pass one row with each call. Use<div><br></div><div><div> PetscCallA(MatSetValues(A,1,i,4,j,aA(i+1,:),INSERT_VALUES,ierr))</div><div><br></div><div><br><blockquote type="cite"><div>On Aug 19, 2023, at 4:47 PM, Sanjay Govindjee <s_g@berkeley.edu> wrote:</div><br class="Apple-interchange-newline"><div>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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>
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 class="moz-signature" cols="72">--
</pre>
</div>
<span id="cid:CAB5C1C8-4589-46FE-97BF-6FAC9F7E82FC"><vecmatkspf.F90></span><span id="cid:E679B62C-8008-49AA-BE4A-7B87EC5DA105"><makefile.txt></span></div></blockquote></div><br></div></body></html>