Yes.  John Linford (formerly of ParaTools, Inc. aka TAU team, now at ARM)
developed such a thing for OpenSHMEM.

Jeff

---------- Forwarded message ----------
I've written a Fortran bindings generator that uses ISO_C_BINDING to link a
Fortran code to any SHMEM implementation with C linkage:
https://github.com/jlinford/shmem_iso_c_binding. shmem.f90 in that repo
provides the complete OpenSHMEM 1.2 API.

We can use this and the TAU Performance System to automatically generate
Fortran interfaces for just about any OpenSHMEM implementation, and to
update bindings as the API expands, in support of
https://github.com/openshmem-org/specification/pull/48.

There are some quirks of using ISO_C_BINDING, e.g. shmem_malloc needs a
following call to c_f_pointer and C_PTRDIFF_T isn't available in some
compilers so I used C_INTPTR_T as a workaround.   See rotput.f90 in the
repo for details.


On Thu, May 3, 2018 at 8:50 AM, Smith, Barry F. <bsm...@mcs.anl.gov> wrote:

>
>    Jeff, (and others),
>
>      Do you know of a tool that can take a C prototype and automatically
> generate the Fortran C binding interface definition? We currently generate
> stubs for C functions that have character arguments manually and it would
> be great to remove that manual step.
>
>    Thanks
>
>       Barry
>
>
> > On May 2, 2018, at 11:42 PM, Jeff Hammond <jeff.scie...@gmail.com>
> wrote:
> >
> > Or you could just use ISO_C_BINDING.  Decent compilers should support it.
> >
> > On Wed, May 2, 2018 at 8:56 AM, Jed Brown <j...@jedbrown.org> wrote:
> > See Fortran Language Issues.
> >
> >   https://gcc.gnu.org/gcc-8/porting_to.html
> >
> > We'll have to test for this (probably compiler version) and change the
> > PETSC_MIXED_LEN / PETSC_END_LEN to use size_t instead of int.
> >
> >
> >
> > --
> > Jeff Hammond
> > jeff.scie...@gmail.com
> > http://jeffhammond.github.io/
>
>


-- 
Jeff Hammond
jeff.scie...@gmail.com
http://jeffhammond.github.io/

Reply via email to