[petsc-dev] Issues with Fortran Interfaces for PetscSort routines
Fabian.Jakub
Fabian.Jakub at physik.uni-muenchen.de
Mon Jul 29 18:26:13 CDT 2019
Fixes it for me. Many thanks for the prompt reply!
On 7/30/19 12:34 AM, Zhang, Junchao wrote:
> Fixed in jczhang/fix-sort-fortran-binding and will be in master later. Thanks.
> --Junchao Zhang
>
>
> On Mon, Jul 29, 2019 at 10:14 AM Fabian.Jakub via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>> wrote:
> Dear Petsc,
>
> Commit 051fd8986cf23c0556f4229193defe128fafa1f7 changed the C signature
> of the sorting routines and as a result I cannot compile against them
> anymore from Fortran.
> I tried to rebuild Petsc from scratch and did a make allfortranstubs but
> still to no avail.
>
> I attach a simple fortran program that calls PetscSortInt and gives the
> following error at compile time.
>
>
>
>
> petsc_fortran_sort.F90:15:27:
>
> call PetscSortInt(N, x, ierr)
> 1
> Error: Rank mismatch in argument ‘b’ at (1) (scalar and rank-1)
>
> Same applies for other routines such as PetscSortIntWithArrayPair...
>
> I am not sure where to find the FortranInterfaces and currently had no
> time to dig deeper.
>
> Please let me know if I have missed something stupid.
>
> Many thanks,
>
> Fabian
>
>
> P.S. Petsc was compiled with
> --with-fortran
> --with-fortran-interfaces
> --with-shared-libraries=1
>
More information about the petsc-dev
mailing list