This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: OpenACC-Library-Interoperability
- From: Vikram Singh <vikramsingh001 at gmail dot com>
- To: Cesar Philippidis <cesar_philippidis at mentor dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Salvatore Filippone <filippone dot salvatore at gmail dot com>, Vladimír Fuka <vladimir dot fuka at gmail dot com>, James Norris <jnorris at codesourcery dot com>, Chung-Lin Tang <cltang at codesourcery dot com>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Wed, 31 Aug 2016 12:42:49 +0300
- Subject: Re: OpenACC-Library-Interoperability
- Authentication-results: sourceware.org; auth=none
- References: <CAD0gq3XehzKyOqvqWfmSErNiy8CKkHqNvqAg5nU5eCyV5gQ4RA@mail.gmail.com> <8737qn5rd4.fsf@kepler.schwinge.homeip.net> <CAD0gq3XgHLLWfY8BJWCc2vPC6S4E2tHBvBfdok0yK5Gs4K5Qzw@mail.gmail.com> <8760vj45bi.fsf@hertz.schwinge.homeip.net> <CAKe2itfWOXb11iRpVtJXsU9Eh-3RpdK4dt_WX+WRO6bLvgd-NQ@mail.gmail.com> <CANSzZf4vnc23kHpSGQ4mW8RmuAYeytZu8dYvPQ3xi_v9V9Q7iQ@mail.gmail.com> <2b4f59d5-be38-2814-27bb-73aa7ffb4b8f@codesourcery.com> <878u0o6wwj.fsf@kepler.schwinge.homeip.net> <CAD0gq3VX0x6qCkMWLJBqK=9WRYk0O_38yCctwaQRcmqdWU0jiQ@mail.gmail.com> <87inyjuw6b.fsf@kepler.schwinge.homeip.net> <CAD0gq3VoRWCiXRkgi-bnGLBfSjR-bFc0Mzp19LRr+yWP4MrYLg@mail.gmail.com> <CAD0gq3WmRfe7g-F-=imZMZg9zNE=sJ8xTcveb-H9F7_92wSjVA@mail.gmail.com> <CAD0gq3VN5h4e5QGOAJe9kes554P3yeXekY3sacy86B1RwuKJGQ@mail.gmail.com> <5c27828e-6b7b-bdde-1fb2-0d0984e4123b@mentor.com> <CAD0gq3WGtSo7bg3vBo_T1WmVt6pnJOthgkM9s6CGqmmVttEuyg@mail.gmail.com> <84ac193d-5cfe-277c-732e-73bfa89ab6f8@mentor.com>
Thanks Cesar for the explanation.
On Mon, Aug 29, 2016 at 7:15 PM, Cesar Philippidis
<cesar_philippidis@mentor.com> wrote:
> On 08/29/2016 08:38 AM, Vikram Singh wrote:
>
>> z from the cublasdgemm call gives 0 everywhere, unlike the actual
>> dgemm call. The first line of output is
>>
>> ** On entry to DGEMM parameter number 1 had an illegal value
>
> Check the documentation for cublas. You may not be calling that function
> with the proper arguments.
>
>> In addition, I looked at your test case. You do not do
>>
>> !$acc update self(y)
>>
>> Does that mean that the host variable is automatically updated in gfortran.
>
> The host_data clause tells the compiler to use variables that have
> already been mapped onto the accelerator via acc data or acc enter enter
> data. You need to use the data directives to actually move the data as
> appropriate. In host_data-2.f90 example, the value of 'y' was going to
> be copyied out by the acc data region, so there was no need to use acc
> update host.
>
> You only need to use the update directive if you want to retain that
> data on the accelerator.
>
> Cesar