Re: [petsc-users] Fortran problem MatGetValuesLocal
It looks like we don't have a Fortran interface for this. In the source code: 2366: Developer Note:2367: This is labeled with C so does not automatically generate Fortran stubs and interfaces2368: because it requires multiple Fortran interfaces depending on which arguments are scalar or arrays. Someone else might be able to offer a workaround. Thanks, Mark On Tue, Nov 28, 2023 at 5:46 AM Frank Bramkamp wrote: > Dear PETSc team, > > > We are using the latest petsc version 3.20.1, intel compiler 2023, > and we found the following problem: > > We want to call the function MatGetValuesLocal to extract a block > sub-matrix > from an assembled matrix (e.g. a 5x5 blocked sub matrix). We use the > matrix format MatCreateBAIJ in parallel. > In particular we try to call MatGetValuesLocal in Fortran. > > It seems that the linked does not find the subroutine MatGetValuesLocal. > The subroutine MatGetValues seems to be fine. > I guess that the fortran stubs/fortran interface is missing for this > routine. > On the documentation side, you also write a note for developers that the > fortran stubs and interface > Is not automatically generated for MatGetValuesLocal. So maybe that has > been forgotten to do. > > > Unfortunately I do not have any small test example, since we just > incorporated the function call into our own software. > Otherwise I would first have to set a small test example for the parallel > case. > > I think there is also an include file where one can check the fortran > interfaces ?! > I forgot where to look this up. > > > Greetings, Frank Bramkamp > > > > > > > > > > >
Re: [petsc-users] Fortran problem MatGetValuesLocal
This is fixed in branch barry/2023-11-28/add-matsetvalueslocal-fortran/release see also https://gitlab.com/petsc/petsc/-/merge_requests/7065 > On Nov 28, 2023, at 8:46 AM, Frank Bramkamp wrote: > > Dear PETSc team, > > > We are using the latest petsc version 3.20.1, intel compiler 2023, > and we found the following problem: > > We want to call the function MatGetValuesLocal to extract a block sub-matrix > from an assembled matrix (e.g. a 5x5 blocked sub matrix). We use the matrix > format MatCreateBAIJ in parallel. > In particular we try to call MatGetValuesLocal in Fortran. > > It seems that the linked does not find the subroutine MatGetValuesLocal. > The subroutine MatGetValues seems to be fine. > I guess that the fortran stubs/fortran interface is missing for this routine. > On the documentation side, you also write a note for developers that the > fortran stubs and interface > Is not automatically generated for MatGetValuesLocal. So maybe that has been > forgotten to do. > > > Unfortunately I do not have any small test example, since we just > incorporated the function call into our own software. > Otherwise I would first have to set a small test example for the parallel > case. > > I think there is also an include file where one can check the fortran > interfaces ?! > I forgot where to look this up. > > > Greetings, Frank Bramkamp > > > > > > > > > >
[petsc-users] Fortran problem MatGetValuesLocal
Dear PETSc team, We are using the latest petsc version 3.20.1, intel compiler 2023, and we found the following problem: We want to call the function MatGetValuesLocal to extract a block sub-matrix from an assembled matrix (e.g. a 5x5 blocked sub matrix). We use the matrix format MatCreateBAIJ in parallel. In particular we try to call MatGetValuesLocal in Fortran. It seems that the linked does not find the subroutine MatGetValuesLocal. The subroutine MatGetValues seems to be fine. I guess that the fortran stubs/fortran interface is missing for this routine. On the documentation side, you also write a note for developers that the fortran stubs and interface Is not automatically generated for MatGetValuesLocal. So maybe that has been forgotten to do. Unfortunately I do not have any small test example, since we just incorporated the function call into our own software. Otherwise I would first have to set a small test example for the parallel case. I think there is also an include file where one can check the fortran interfaces ?! I forgot where to look this up. Greetings, Frank Bramkamp