PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Data visualization
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
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Mon Jan 03, 2011 3:32 pm    Post subject: Reply with quote

mkcolg wrote:

I was able to work around the seg fault by allocating the array before calling cudaGLSetGLDevice.


Hi Mat.
CUDA C Prog. guide mentioned that cudaSetDeivce() and cudaGLSetGLDevice() are mutually exclusive. So, is it okay to use both in the same code?


mkcolg wrote:

I'm sure why the segv occurred but hopefully it will get you farther along as you blaze trail here.

Is this a CUDA bug or something from the compiler?

Regards,
Tuan
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Tue Jan 04, 2011 11:18 am    Post subject: Reply with quote

Hi Mat,
Actually, calling both cudaSetDevice and cudaGLSetGLDevice() doesn't work.
I got the error message

Code:
IF (cudaSetDevice( gpuID ) .NE. cudaSuccess) THEN
    PRINT *, "Cannot set GPU device: ", gpuID
    WRITE(*,*) cudaGetErrorString(cudaSetDevice(gpuID))
    CALL cleanup()
    STOP
  ELSE
    PRINT *, "We use device ID ", gpuID
  ENDIF

 IF (cudaGLSetGLDevice( gpuID ) .NE. cudaSuccess) THEN
    PRINT *, "Cannot set GPU device: ", gpuID
    WRITE(*,*) cudaGetErrorString(cudaSetDevice(gpuID))
    CALL cleanup()
    STOP
  ELSE
    PRINT *, "We use device ID ", gpuID, " for OpenGL"
  ENDIF

Quote:
"setting the device when a process is active is not allowed"


Is there a solution to work-around for now?

Thanks,
Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jan 05, 2011 5:32 pm    Post subject: Reply with quote

Hi Tuan,

This is new for me as well so don't know the answer. I'm waiting for a reply from my contacts at NVIDIA for advice.

- Mat


Last edited by mkcolg on Thu Jan 06, 2011 9:34 am; edited 1 time in total
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Thu Jan 06, 2011 7:41 am    Post subject: Reply with quote

Thanks Mat. Please keep me updated when you get the response.

Tuan
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Thu Jan 13, 2011 1:12 pm    Post subject: Reply with quote

mkcolg wrote:
Hi Tuan,

This is new for me as well so don't know the answer. I'm waiting for a reply from my contacts at NVIDIA for advice.

- Mat


Hi Mat,
May I ask you any update?

Thanks,

Tuan
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