OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

What is the proper way/place to call cudaGLSetGLDevice in OSG?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute]
View previous topic :: View next topic  
Author Message
sholmes
User


Joined: 05 Sep 2011
Posts: 62

PostPosted: Wed Oct 05, 2011 3:53 pm    Post subject:
What is the proper way/place to call cudaGLSetGLDevice in OSG?
Reply with quote

Hi,

I am in a bind, and need to add some cuda to my OSG app quickly, as in by the end of hte day. I had hoped to use osgComputer/Cuda, but I am having problems getting it to build on my machine. I suspect it is due to my using CUDA 4.0. ...so... I am trying to add it "manually" through the code as needed. My first, seemingly insurmountable hurdle, is that I can seem to set the cuda device to use... If I call cudaGLSetGLDevice before I instantiate the viewer, I get an error stating the all cuda capable devices are busy or unavailable... I thought perhaps this was a graphics context issue, so I moved this call to after I instantiate the viewer. If I call cudaGLSetGLDevice after I instantiate the viewer, I get an error stating that setting the device when a process is active is not allowed.

What is the proper way/place to call cudaGLSetGLDevice in OSG?

CD

Thank you!

Cheers,
Conan
Back to top
View user's profile Send private message
Mick
User


Joined: 11 Mar 2009
Posts: 31

PostPosted: Wed Oct 05, 2011 4:45 pm    Post subject:
Re: What is the proper way/place to call cudaGLSetGLDevice in OSG?
Reply with quote

Hi Conan,

my first guess is that the Cmake-Scripts did not find Cuda on your system. Cuda 4.0 is not a problem in general. Thus try to build osgCompute again from scratch and take a look at the advanced variable "CUDA_RUNTIME_LIBRARY". If it is not available correctly you will have to set it manually to your cudart-library (this may be the case on 64-Bit machines since we still have to adapt the FindCuda script for Cmake).

Good luck!



sholmes wrote:
Hi,

I am in a bind, and need to add some cuda to my OSG app quickly, as in by the end of hte day. I had hoped to use osgComputer/Cuda, but I am having problems getting it to build on my machine. I suspect it is due to my using CUDA 4.0. ...so... I am trying to add it "manually" through the code as needed. My first, seemingly insurmountable hurdle, is that I can seem to set the cuda device to use... If I call cudaGLSetGLDevice before I instantiate the viewer, I get an error stating the all cuda capable devices are busy or unavailable... I thought perhaps this was a graphics context issue, so I moved this call to after I instantiate the viewer. If I call cudaGLSetGLDevice after I instantiate the viewer, I get an error stating that setting the device when a process is active is not allowed.

What is the proper way/place to call cudaGLSetGLDevice in OSG?

CD

Thank you!

Cheers,
Conan


Best regards,
Mick

_________________
SVT Group
Back to top
View user's profile Send private message
sholmes
User


Joined: 05 Sep 2011
Posts: 62

PostPosted: Wed Oct 05, 2011 8:15 pm    Post subject:
Re: What is the proper way/place to call cudaGLSetGLDevice in OSG?
Reply with quote

I'll give that a try...
CD

Mick wrote:
Hi Conan,

my first guess is that the Cmake-Scripts did not find Cuda on your system. Cuda 4.0 is not a problem in general. Thus try to build osgCompute again from scratch and take a look at the advanced variable "CUDA_RUNTIME_LIBRARY". If it is not available correctly you will have to set it manually to your cudart-library (this may be the case on 64-Bit machines since we still have to adapt the FindCuda script for Cmake).

Good luck!



sholmes wrote:
Hi,

I am in a bind, and need to add some cuda to my OSG app quickly, as in by the end of hte day. I had hoped to use osgComputer/Cuda, but I am having problems getting it to build on my machine. I suspect it is due to my using CUDA 4.0. ...so... I am trying to add it "manually" through the code as needed. My first, seemingly insurmountable hurdle, is that I can seem to set the cuda device to use... If I call cudaGLSetGLDevice before I instantiate the viewer, I get an error stating the all cuda capable devices are busy or unavailable... I thought perhaps this was a graphics context issue, so I moved this call to after I instantiate the viewer. If I call cudaGLSetGLDevice after I instantiate the viewer, I get an error stating that setting the device when a process is active is not allowed.

What is the proper way/place to call cudaGLSetGLDevice in OSG?

CD

Thank you!

Cheers,
Conan


Best regards,
Mick
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute] All times are GMT
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
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Proper CMAKE settings for ZLIB, bog... loopy Build system [build] 4 Wed Nov 02, 2016 9:05 pm View latest post
No new posts Problematic call of flushDeletedGLObj... kragnfroll General 4 Fri Sep 23, 2016 3:13 pm View latest post
No new posts Why is setTexCoordArray(0,texcoords) ... florian General 11 Thu Jul 07, 2016 9:24 am View latest post
No new posts set proper size to window manager at ... gambr General 9 Fri Apr 15, 2016 7:42 am View latest post
No new posts Wrong function call in setTextureAttr... scrawl Submission 1 Thu Mar 10, 2016 7:59 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP