[petsc-dev] MatSetValues (Fortran)

Barry Smith bsmith at mcs.anl.gov
Tue Nov 22 20:42:37 CST 2016


   We'll support this in a few days but for now just use

PetscScalar :: m(1) 

instead of 

PetscScalar :: m(1,1) 


> On Nov 22, 2016, at 8:37 PM, Tabrez Ali <stali at geology.wisc.edu> wrote:
> 
> 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)
>>>>> 
>>>>> 
>>> 
>>> 
> 
> <test.F90>




More information about the petsc-dev mailing list