Yes, that was the complete message (GNU FC). I am attaching a test case.

Tabrez

On 11/22/2016 07:51 PM, Satish Balay wrote:
It will also work if you use MatSetValues11() or MatSetValues1n() -
but then - you will be using F77 mode of calling that routine - and
bypassing the f90 interface definition [that supporsedly provides type
checks]

It would be good to figure out whats hapenning here. Is what you sent
the complete error message? How about a minimal code snippet that we
can compile to reproduce the error?

Satish

On Tue, 22 Nov 2016, Tabrez Ali wrote:

Hello Satish

It works fine if I use MatSetValues0 instead of MatSetValues.

Tabrez

On 11/22/2016 07:25 PM, Satish Balay wrote:
f90 interface definitions for MatSetValues were added. So if you are
including petscmat.h90 - there should interface check by the compiler.

https://bitbucket.org/petsc/petsc/commits/4d03fd2beba63756fb8890bf1826f747a8ce8800

Looks like this check is failing. Does the compiler print more info on
why it didn't find a match?

Or is the compiler complaining about using MatSetValues0 - instead of
MatSetValues here?

https://bitbucket.org/petsc/petsc/commits/3b494cfec78d3366d5cde5f82eed4f6aebe3762b

If you can reproduce this in a test code - that would help.

Satish

On Tue, 22 Nov 2016, Tabrez Ali wrote:

Hello

I am using petsc-dev and today I got the following error (below) while
compiling the code. I guess this has to do with the Fortran interfaces but
I
cannot spot what's wrong. Any ideas?

Tabrez

/opt/mpich3/bin/mpif90 -c -Wall -ffree-line-length-0
-Wno-unused-dummy-argument -g    -I/home/stali/petsc-dev/include
-I/home/stali/petsc-dev/arch-linux2-c-debug/include -I/opt/mpich3/include
-o main.o main.F90
main.F90:177:75:

        call
MatSetValues(Mat_K,ef_eldof,indx,ef_eldof,indx,k,Add_Values,ierr)
1
Error: There is no specific subroutine for the generic ‘matsetvalues’ at
(1)





module foo
  implicit none
#include <petsc/finclude/petscdef.h>
  PetscInt :: idx(1),ierr
  PetscScalar :: m(1,1) 
  Mat :: Mat_M
end module foo

program bar
  use foo
  implicit none
#include <petsc/finclude/petsc.h90>
  call PetscInitialize(Petsc_Null_Character,ierr)
  m=5.0d0
  call MatCreateAIJ(Petsc_Comm_World,Petsc_Decide,Petsc_Decide,1,1,1,       &
       Petsc_Null_Integer,1,Petsc_Null_Integer,Mat_M,ierr)
  call MatSetValues(Mat_M,1,idx,1,idx,m,Insert_Values,ierr)
  call MatAssemblyBegin(Mat_M,Mat_Final_Assembly,ierr)
  call MatAssemblyEnd(Mat_M,Mat_Final_Assembly,ierr)
  call MatDestroy(Mat_M,ierr)
  call PetscFinalize(ierr) 
end program bar

Reply via email to