[petsc-dev] [FORGED] PetscSF in Fortran

Barry Smith bsmith at mcs.anl.gov
Tue Oct 24 22:09:06 CDT 2017


> On Oct 24, 2017, at 9:50 PM, Adrian Croucher <a.croucher at auckland.ac.nz> wrote:
> 
> hi Barry,
> 
> 
> On 25/10/17 11:23, Barry Smith wrote:
>>     I have updated the branch barry/fortran-PetscSFBcastBegin to support using Fortran datatypes and PetscSFGetGraph()
>> 
>>     Please let me know of additional difficulties.
> 
> Thanks, this is looking pretty good now.
> 
> I think there may be a slight bug in the C interface for PetscSFGetGraph()- it is returning the ilocal array with size nroots, but I think it should be size nleaves, i.e. src/vec/is/sf/interface/ftn-custom/zsf.c:30 should be:
> 
>  *ierr = F90Array1dCreate((void*)ilocal,MPIU_INT,1,*nleaves, ailocal PETSC_F90_2PTR_PARAM(pilocal));

  Oh, yes right. This is what happens when I write code and have no idea what it is doing ;)

   Fixed now.

   Thanks

   Barry

> 
> Other than that I think it is all go. (It even rightfully complains now if I try to pass MPI_INT instead of MPI_INTEGER into PetscSFBcastBegin() in my Fortran calling code.)
> 
> - Adrian
> 
> -- 
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 4611
> 



More information about the petsc-dev mailing list