[petsc-dev] [FORGED] Re: PetscSF in Fortran

Adrian Croucher a.croucher at auckland.ac.nz
Tue Oct 24 21:50:33 CDT 2017


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));

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