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 

trunk compile


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute]
View previous topic :: View next topic  
Author Message
J.P. Delport
Guest





PostPosted: Mon Oct 03, 2011 1:42 pm    Post subject:
trunk compile
Reply with quote

Hi,

I just compiled osgCompute trunk with the latest OSG trunk and Cuda 4.0
on a 64-bit machine with gcc/g++ 4.4.

I had to make some minor changes, I think the diff below should be OK to
notice them. gl->GL for case sensitive Linux and cstring or string.h is
needed for memcpy.

Also, I had to manually set the path to the cudart library to point to
lib64 (/usr/local/cuda/lib64/libcudart.so) on my machine instead of lib.
I think this probably needs to be fixed in FindCUDA, but I can't look at
it now.

rgds
jp

---8<---

$ svn diff
Index: src/osgCuda/Computation.cpp
===================================================================
--- src/osgCuda/Computation.cpp (revision 426)
+++ src/osgCuda/Computation.cpp (working copy)
@@ -1,4 +1,4 @@
-#include <osg/gl>
+#include <osg/GL>
#include <cuda_runtime.h>
#include <builtin_types.h>
#include <cuda_gl_interop.h>
Index: examples/osgGeometryDemo/src/Warp.cpp
===================================================================
--- examples/osgGeometryDemo/src/Warp.cpp (revision 426)
+++ examples/osgGeometryDemo/src/Warp.cpp (working copy)
@@ -12,6 +12,7 @@
*
* The full license is in LICENSE file included with this distribution.
*/
+#include <cstring>
#include <osg/Array>
#include <osgCuda/Memory>
#include <osgCuda/Geometry>




--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.



------------------
Post generated by Mail2Forum
Back to top
Bart
Newbie


Joined: 13 Nov 2009
Posts: 9

PostPosted: Wed Oct 05, 2011 10:04 am    Post subject:
Reply with quote

I also made a comment on the 'gl -> GL' and the '#include <cstring>' in my post at http://forum.openscenegraph.org/viewtopic.php?t=9112 The reply of one of the developers is:
"The most recent test we did is with OSG Library 3.1.0 (developer version). It runs with no problems."

Quote:
Also, I had to manually set the path to the cudart library to point to
lib64 (/usr/local/cuda/lib64/libcudart.so) on my machine instead of lib.
I think this probably needs to be fixed in FindCUDA, but I can't look at
it now.

Setting the CUDA evironment variables to the correct directories before installing osgCompute should also fix the problem. It concerns the following variables: CUDADIR, CUDA_BIN_PATH, CUDA_INC_PATH, and CUDA_LIB_PATH
Back to top
View user's profile Send private message
Mick
User


Joined: 11 Mar 2009
Posts: 31

PostPosted: Wed Oct 05, 2011 11:38 am    Post subject:
Reply with quote

Hi JP,

thanks a lot for the diff. We will include it into the source soon.
The problem with the FindCuda-script is that we actually just tested it with 32 Bit machines. We need to take a closer look at this. Thank you!

Best regards,
Mick

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


Joined: 11 Mar 2009
Posts: 31

PostPosted: Wed Oct 05, 2011 12:04 pm    Post subject:
Reply with quote

Code:

$ svn diff
Index: src/osgCuda/Computation.cpp
===================================================================
--- src/osgCuda/Computation.cpp (revision 426)
+++ src/osgCuda/Computation.cpp (working copy)
@@ -1,4 +1,4 @@
-#include <osg/gl>
+#include <osg/GL>
#include <cuda_runtime.h>
#include <builtin_types.h>
#include <cuda_gl_interop.h>
Index: examples/osgGeometryDemo/src/Warp.cpp
===================================================================
--- examples/osgGeometryDemo/src/Warp.cpp (revision 426)
+++ examples/osgGeometryDemo/src/Warp.cpp (working copy)
@@ -12,6 +12,7 @@
*
* The full license is in LICENSE file included with this distribution.
*/
+#include <cstring>
#include <osg/Array>
#include <osgCuda/Memory>
#include <osgCuda/Geometry>



...I just committed the changes to the trunk. Thank you.
The FindCuda-script has not been updated yet.

Best regards,
Mick

_________________
SVT Group
Back to top
View user's profile Send private message
J.P. Delport
Guest





PostPosted: Wed Oct 05, 2011 12:30 pm    Post subject:
trunk compile
Reply with quote

Hi,

On 05/10/2011 14:04, Mick Keller wrote:
Quote:
...I just committed the changes to the trunk. Thank you.
The FindCuda-script has not been updated yet.

Best regards,
Mick

thanks.

Tt appears that the latest CMake versions (at least 2.8.5 that I have on
Debian Sid) includes a FindCUDA script as well, maybe you can check that
out.

regards
jp

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.



------------------
Post generated by Mail2Forum
Back to top
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 OsgText compile issue with the newer ... crubel@compro.net General 4 Wed Nov 15, 2017 7:29 pm View latest post
No new posts How to pre-compile shaders before act... kornerr General 1 Thu Sep 28, 2017 8:42 pm View latest post
No new posts Compile error with Visual Studio 2017 draccagni General 2 Sat Aug 19, 2017 1:52 pm View latest post
No new posts OpenThreads Pthread.cpp fails to comp... crubel@compro.net Submission 3 Tue Nov 29, 2016 9:26 pm View latest post
No new posts bug: Android cross compile (windows) ... remoe Build system [build] 0 Sat Oct 29, 2016 7:51 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