OpenACC-Library-Interoperability
Thomas Schwinge
thomas@codesourcery.com
Thu May 12 15:35:00 GMT 2016
Hi!
On Fri, 15 Apr 2016 13:59:53 +0300, Vikram Singh <vikramsingh001@gmail.com> wrote:
> I checked libgomp.oacc-c-c++-common/context-*.c, and they seem to be
> exactly what I needed to start with.
>
> If I understand it correctly, I'll anyway be trying to implement
> something similar with PGI compilers, so I'll have something as a
> starting point.
Any progress on that already? I had a very quick look myself, but it's
not as easy as I thought... A "courageous" use of "use cublas" in
Fortran code compiled with gfortran results in: "Fatal Error: Can't open
module file 'cublas.mod' for reading". The problem is: Fortran
interfacing to C libraries (which cuBLAS is).
<http://docs.nvidia.com/cuda/cublas/index.html#appendix-b-cublas-fortran-bindings>
has some instructions how to do it. Anyone got that to work already?
> But again, it will need the OpenACC host_data construct to be setup
> for gfortran to test.
In
<http://news.gmane.org/find-root.php?message_id=%3C2b4f59d5-be38-2814-27bb-73aa7ffb4b8f%40codesourcery.com%3E>,
Chung-Lin has now posted a patch (pending review) that should make the
OpenACC host_data construct usable in GCC Fortran. (Problem discussed in
<http://news.gmane.org/find-root.php?message_id=%3C878u0o6wwj.fsf%40kepler.schwinge.homeip.net%3E>
before.)
For reference:
> On Fri, Apr 15, 2016 at 11:57 AM, Thomas Schwinge
> <thomas@codesourcery.com> wrote:
> > On Fri, 15 Apr 2016 11:35:06 +0300, Vikram Singh <vikramsingh001@gmail.com> wrote:
> >> Yes, I came to the conclusion that host_data
> >> would be the only way to do it in fortran.
> >>
> >> On the other hand, I though there were no plans to implement it in
> >> gfortran 6 either
> >
> > I still hope we'll get this (that is, <https://gcc.gnu.org/PR70598>)
> > fixed in time for the GCC 6.1 release. I'll keep you posted.
> >
> >
> >> > I'm copying Jim, who is the author of this chapter in the documentation
> >> > as well as the libgomp/testsuite/libgomp.oacc-c-c++-common/context-*.c
> >> > test cases, and much of the relevant libgomp code, too, and who should
> >> > please correct me if I'm wrong. I'll make a note for later, that we
> >> > should translate the libgomp.oacc-c-c++-common/context-*.c test cases to
> >> > Fortran, and also replicate them using the OpenACC host_data construct
> >> > (like in libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-1.c), and
> >> > the same for the documentation you referenced. (Vikram, please tell if
> >> > you're interested to work on these items.)
> >>
> >> I am not sure I understand what you want me to work on exactly. I am
> >> not really much of a C programmer, so I wouldn't be good at it. I
> >> would still like to help.
> >
> > Sorry for being unclear. My idea/question has been whether you're
> > interested in helping by translating the documentation as well as the
> > libgomp.oacc-c-c++-common/context-*.c test cases from C to Fortran (using
> > the OpenACC host_data construct instead of the acc_* functions). If yes,
> > then that's great, if not, then one of us will do it at some point.
Grüße
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160512/c1d0b729/attachment.sig>
More information about the Fortran
mailing list