This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenACC-Library-Interoperability


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]