On Sun, Aug 20, 2023 at 6:48 AM Sanjay Govindjee <s...@berkeley.edu> wrote:
> I recently got a copy of E.Bueler's petsc book and was converting the > programs to fortran for my students and have run into a compile error that > I can not figure out. I comment out the MatSetValues line the code > compiles fine. > > When I run make on vecmatkspf.F90, I get the error: > > 42 | PetscCallA(MatSetValues(A,1,i,4,j,aA,INSERT_VALUES,ierr)) > | 1 > Error: There is no specific subroutine for the generic 'matsetvalues' at > (1) > > Your 'i' is a PetscInt, whereas it should be an array like 'j'. Thanks, Matt > My petsc set works, runs with my FEA code and compiles and runs the fortran > programs in the petsc tutorials directories just fine. And in particular, > compiles > and runs the C versions from Bueler. > > I've attached the make file and the source. I must be doing something > obviously wrong but I can not spot it. > > -sanjay > > -- > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>