[petsc-dev] PetscSF in Fortran

Jed Brown jed at jedbrown.org
Fri Oct 20 23:01:50 CDT 2017


Barry Smith <bsmith at mcs.anl.gov> writes:

>> What does that has to do with PetscSF, which never used PetscDataType
>> and uses MPI datatypes with support for derived types (albeit with a
>> limited number of combiners)?
>
>    Because the code he started to write uses F90Array1dAccess() which
>    is built around PetscDataType, hence he needs to convert the
>    MPI_Datatype. Which is where all the trouble comes from. There are
>    multiple ways of resolving his problem, it more depends on my time
>    then anything else since it is unlikely anyone but you or I will
>    "fix" this, and you don't have time.

Ah, okay.  Could we write a type generic interface for that now that we
use more recent Fortran?  We could pass an MPI_Datatype and just check
sizes instead of trying to fully resolve the type.  I think this is
possible with F2008+TS29113, but I haven't looked at those bindings for
a few years and don't remember details.


More information about the petsc-dev mailing list