Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] Fortran interface for StarPU

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] Fortran interface for StarPU


Chronologique Discussions 
  • From: Olivier Aumage <olivier.aumage@u-bordeaux.fr>
  • To: Alfredo Buttari <alfredo.buttari@enseeiht.fr>
  • Cc: starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] Fortran interface for StarPU
  • Date: Tue, 5 Jul 2016 10:31:27 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=olivier.aumage@u-bordeaux.fr; spf=Pass smtp.mailfrom=olivier.aumage@u-bordeaux.fr; spf=None smtp.helo=postmaster@v-zimmta03.u-bordeaux.fr
  • Ironport-phdr: 9a23:NZ9fphZeyvY2aHqRQxFxMRn/LSx+4OfEezUN459isYplN5qZpcW6bnLW6fgltlLVR4KTs6sC0LuO9fq8EjRaqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ3pzxjbz5o8ebSj4LrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jCsRfZQAeIrlEBTnkfiBsAVwHB4gv3UpC3uDbmquNn2QGXO9b7QLE0RXKs9fE4ZgXvjXIgMz8n8WzNwuVtiatUrVr1oBh+3Y/ZesecKf93ca71YJYQQnBNU89MR2pPGNXvPMM0E+MdMLMA/MHGrFwUoE77XFH0CQ==
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hi Alfredo,

I finally found some time to integrate this within StarPU, together with a
few additional tweaks.

I made some modifications to the proposal so as to make it possible to write
native Fortran applications on top of StarPU, without having to write C code
at all on the application side.

The currently supported Fortran StarPU functions are listed in
STARPU/include/fstarpu_mod.f90

Some examples are available in STARPU/examples/native_fortran/. This
directory also contains autonomous Makefiles to compile them from outside the
StarPU build system.

Somes notes:
- fully native Fortran apps are supported with GFortran >= 4.9 and Intel
Fortran >= 2016. I have not yet tested this with other compiler brands.
- the Fortran task implementation functions have to be declared in a module
outside the main program source file, to avoid some link-time issue.
- the native Fortran interface is available in StarPU's SVN repository, in
the trunk/ and in the starpu-1.2/ branches.

Please let me know if you have any suggestion, or need some additional key C
StarPU functions in the Fortran interface.

Best regards,
--
Olivier

> Le 14 avr. 2016 à 10:03, Alfredo Buttari <alfredo.buttari@enseeiht.fr> a
> écrit :
>
> Dear StarPU developers,
> in order to port the qr_mumps solver on StarPU, I have written (and
> re-written quite a few times) a module containing fortran interfaces for
> StarPU methods as well as a few wrappers for those methods that cannot be
> interfaced in a portable way. These wrappers are necessary mostly because
> of the following issues:
>
> 1) C variadic functions are not interoperable and (as far as I know)
> there's no portable way to call them in a fortran code other than going
> through a C wrapper.
>
> 2) some StarPU structs (for example starpu_codelet) are not interoperable.
>
> 3) the arguments of some functions are not of interoperable type. One weird
> and very common case is the unsigned type which (for some obscure reason)
> is not fortran interoperable. For arguments of this type we can use the
> fortran integer type and it will just work although, on paper, this is not
> portable.
>
> In the attachment you can find the starpu_f_mod.f90 file containing a
> number of interfaces and a starpu_f_wrappers.c containing C wrappers. The
> package also contains a main program that shows how to use most of the
> interfaced routines.
>
> I discussed with Sam Thibault about the possibility to integrate this
> interface in StarPU to make it available to the other concerned users. The
> module is far from being complete and only contains a small fraction of all
> the StarPU methods but if we agree on the approach and the syntax then it's
> just a matter of coding the rest gradually, as needed.
>
>
> Ciao
> Alfredo
>
>
>
> --
> -----------------------------------------
> Alfredo Buttari, PhD
> CNRS-IRIT
> 2 rue Camichel, 31071 Toulouse, France
> http://buttari.perso.enseeiht.fr
> <starpu_f.tgz>_______________________________________________
> Starpu-devel mailing list
> Starpu-devel@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/mailman/listinfo/starpu-devel





Archives gérées par MHonArc 2.6.19+.

Haut de le page