PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

How to create dummy context in CUDA Fortran?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Wed Apr 27, 2011 11:32 am    Post subject: Reply with quote

Code:
Any ideas?
No, sorry. I guess I'd need to see an example. Can you send something to PGI Customer Service (trs@pgroup,com)?

Thanks,
Mat
Back to top
View user's profile
TheMatt



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

PostPosted: Wed Apr 27, 2011 12:05 pm    Post subject: Reply with quote

This might not be useful, but does cudaSetDevice create a context? It might because I know in my code I have to issue a cudaThreadExit call before I can issue cudaSetDevice because (in the past at least), I had to clear all contexts before I initialized my devices.

If so, maybe issuing a cudaSetDevice call might create the context early on. It might be functionally superfluous because you only have one device, but that superfluous call might allow you to create the context and then not have it impact a timer later on. (I use it because my boxes have 2 or 4 GPUs and I'm running with MPI. The 2-3 seconds of time this takes is shown in the timers for this routine, and thus in the overall time of the code, but not in the subsequent CUDA Fortran kernel calls.)

Matt
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
Goto page Previous  1, 2
Page 2 of 2

 
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