PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

OpenACC code with pinned memory

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
IrinaDDD



Joined: 24 Jan 2012
Posts: 12

PostPosted: Sun Dec 09, 2012 7:17 pm    Post subject: OpenACC code with pinned memory Reply with quote

Good time of day.
I would like to ask you if it is possible to use pinned memory with OpenACC code? When I try to do this, I get next error:

PGF90-S-0034-Syntax error at or near pinned (matmul.f90: 6)
0 inform, 0 warnings, 1 severes, 0 fatal for main

I compile like:

pgfortran -O3 -acc -fast -ta=nvidia -Minfo=accel matmul.f90 -o matmul

My code looks like:

real (8), dimension(:,:), allocatable, pinned :: a, b, c
.....
allocate( a(n,m) )
allocate( b(n,m) )
allocate( c(n,m) )
call acc_init( acc_device_nvidia )

!$acc data copyin(a,b) copyout(c)

!$acc kernels loop
...
...
!$acc end kernels
!$acc end data

Thank you in advance,
Irina
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Mon Dec 10, 2012 10:20 am    Post subject: Reply with quote

Irina,

I think "pinned" is only part of CUDA Fortran, so you might have to add "-Mcuda" to your compile string for the compiler to recognize it.

Matt
Back to top
View user's profile
IrinaDDD



Joined: 24 Jan 2012
Posts: 12

PostPosted: Mon Dec 10, 2012 10:10 pm    Post subject: Reply with quote

Thank you, Matt.
Yes, it works with -Mcuda
I am wondering if there are any possible conflict situations on allocating pinned memory at the OpenACC code?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6211
Location: The Portland Group Inc.

PostPosted: Tue Dec 11, 2012 8:59 am    Post subject: Reply with quote

Cuda Fortran and OpenACC are interoperable, so no they would not be in conflict.

- Mat
Back to top
View user's profile
IrinaDDD



Joined: 24 Jan 2012
Posts: 12

PostPosted: Tue Dec 11, 2012 7:09 pm    Post subject: Reply with quote

Thank you for an explanations!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group