PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

cudaSetDevice seems completely broken
Goto page Previous  1, 2, 3  Next
 
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: 6134
Location: The Portland Group Inc.

PostPosted: Wed May 05, 2010 11:27 am    Post subject: Reply with quote

Hi Jeremy,

I added TPR#16922 for the bounds-checking ICE.

Quote:
If I notice any more should I just tack them on to this thread or should I make new threads?
I would prefer a new post per issue to make it easier for other users to follow and find similar issues. However, if you prefer a single thread to make it easier for you to follow, then this is fine as well.

- Mat
Back to top
View user's profile
cknaus



Joined: 18 Feb 2010
Posts: 4

PostPosted: Mon Jun 21, 2010 5:46 am    Post subject: Reply with quote

Hi,

We just purchased a machine with an NVIDIA Quadro NVS 295 and two Tesla C2050 cards. Does TPR#16895 mean that I can only use the Quadro GPU and that I cannot address the other two GPUs?

Claude Knaus
Computer Graphics Group
University of Bern
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jun 21, 2010 12:40 pm    Post subject: Reply with quote

Hi cknaus

Quote:
Does TPR#16895 mean that I can only use the Quadro GPU and that I cannot address the other two GPUs?
Unfortunately in CUDA Fortran you can currently only use the first GPU (note the PGI Accelerator Model can use all devices). This is high priority issue for our engineers and they are actively working on the problem. However, due to the complexity of the problem, we don't expect a fix to be available until August or September of 2010.

With apologies,
Mat
Back to top
View user's profile
cknaus



Joined: 18 Feb 2010
Posts: 4

PostPosted: Tue Jun 22, 2010 6:24 am    Post subject: Reply with quote

Hi Mat,

Thanks for the prompt reply. Can you clarify "first GPU": if I remove the Quadro and replace it with a non-CUDA capable graphics card, will I then be able to use one of the installed Tesla cards with CUDA Fortran?

Cheers,

Claude Knaus
Computer Graphics Group
University of Bern
Back to top
View user's profile
TheMatt



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

PostPosted: Tue Jun 22, 2010 6:27 am    Post subject: Reply with quote

mkcolg wrote:
Hi cknaus

Quote:
Does TPR#16895 mean that I can only use the Quadro GPU and that I cannot address the other two GPUs?
Unfortunately in CUDA Fortran you can currently only use the first GPU (note the PGI Accelerator Model can use all devices). This is high priority issue for our engineers and they are actively working on the problem. However, due to the complexity of the problem, we don't expect a fix to be available until August or September of 2010.

With apologies,
Mat

This may not be true, otherwise my multi-GPU CUDA Fortran program and my unit test with device selection would be failing to choose devices in my Tesla S. I think you can "fix" this by issuing a cudaThreadExit() call.

Namely, in re the original program in this thread, if I run it, I get:
Code:
> pgfortran -o test -Mcuda test.f90 module.cuf
test.f90:
module.cuf:
> ./test
setting the device when a process is active is not allowed

Now we add a cudaThreadExit:
testwithexit.f90:
Code:
program test
      use cudafor
      implicit none

      integer istat
     
      ! Add this command
      istat = cudaThreadExit()
      print *,cudaGetErrorString(iStat)

      istat = cudaSetDevice(0)
      print *,cudaGetErrorString(iStat)
end program test

And:
Code:
> pgfortran -o testwithexit -Mcuda testwithexit.f90 module.cuf
testwithexit.f90:
module.cuf:
> ./testwithexit
 no error

 no error

My guess is that the cudaThreadExit releases the context that occurs when...well..I don't know. Maybe when PGI first does an initialization of the GPUs? I tried a whole bunch of stuff--most of which resulted in spectacular crashes--when I first encountered this.

Whatever, though, a single cudaThreadExit right before you do anything seems to clear up the lock and then you can device select to your heart's content.

ETA: Hmm. I just realized that maybe this won't work if the machine has an actual video card. The machine I work on is just a boring ol' server with integrated graphics. Perhaps having a real video card does something...
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, 3  Next
Page 2 of 3

 
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