Building and running OpenCL demo in Nvidia platform

Post Reply
saggita
Posts: 13
Joined: Tue Apr 19, 2011 11:46 pm

Building and running OpenCL demo in Nvidia platform

Post by saggita »

Hi,

I am probably jumping the gun without searching the previous posts thoroughly.

I was trying to run OpenCL cloth demo in Nvidia platform. It was successful to build with Nvidia GPU Computing SDK 4.0 but I ran into several errors when I ran the demo. I am trying to fix them based on OpenCL SDK samples but just want to ask people if I am missing any compile configuration first.

Below is my development environment.

1. Visual Studio 2008 - Version 3.5 SP1
2. NVidia GPU Computing SDK 4.0 (latest as of now) - OpenCL samples are working fine.
3. Two NVidia GPUs - Quadro FX 3800 & Fx 580
4. Latest drivers
5. CL_PLATFORM_NVIDIA is defined.

If you have got this issue and solved it, please share your knowledge with me.

Thank you.

Dongsoo Han
User avatar
Erwin Coumans
Site Admin
Posts: 4232
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Building and running OpenCL demo in Nvidia platform

Post by Erwin Coumans »

I just fixed the Bullet trunk, http://code.google.com/p/bullet/source/detail?r=2411
NVIDIA changed the environment variable from NVSDKCOMPUTE_ROOT to CUDA_PATH, and there were a few other issues.

Also, NVIDIA updated their drivers a few days ago, please try updating again, it should support OpenCL 1.1 now.
Thanks!
Erwin
saggita
Posts: 13
Joined: Tue Apr 19, 2011 11:46 pm

Re: Building and running OpenCL demo in Nvidia platform

Post by saggita »

Thank you Erwin. I will try it.
saggita
Posts: 13
Joined: Tue Apr 19, 2011 11:46 pm

Re: Building and running OpenCL demo in Nvidia platform

Post by saggita »

Hi,

After some modifications, I was able to run Bullet OpenCL demos in NVidia environment. Below is a list of modifications.

1. Since ATI Stream SDK is not installed in my machine, I converted "$(ATISTREAMSDKROOT)lib\x86\OpenCL.lib" to OpenCL.lib in Additional Dependencies property for three OpenCL projects.
2. I had to disable USE_GPU_COPY. I will try to get it work later.
3. clstuff.cpp was modified. It is attached here.
4. CL_PLATFORM_NVIDIA is defined instead of CL_PLATFORM_AMD

Screenshot is attached. In case you notice that something is different from AMD environment, please let me know.

Thanks.

Dongsoo Han
Attachments
BulletOpenCL_screenshot.jpg
BulletOpenCL_screenshot.jpg (46.8 KiB) Viewed 5555 times
clstuff.cpp
(5.45 KiB) Downloaded 153 times
User avatar
Erwin Coumans
Site Admin
Posts: 4232
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Building and running OpenCL demo in Nvidia platform

Post by Erwin Coumans »

The latest trunk should work fine on NVIDIA, when you install the latest CUDA sdk and display drivers.

No single change should be necessary, just run cmake and build and run it.

Can you try the unmodified latest trunk and report the actual error you get?
Thanks,
Erwin

By the way, you might want to try a Geforce 470 or 580 instead of a Quadro
gjunker
Posts: 12
Joined: Fri Aug 26, 2011 10:32 am

Re: Building and running OpenCL demo in Nvidia platform

Post by gjunker »

saggita wrote: 5. CL_PLATFORM_NVIDIA is defined.
Where exactly is this defined? I am also using the latest (4.0) GPU Computing SDK and latest drivers (280.13) on Linux/64, and I can't find this define anywhere (and so the NVidia cloth demo segfaults trying to init with MiniCL).

@Erwin:

I've also run into many problems (2.78 tarball) just trying to get the multithreaded library to build; is it even possible to build it with the autotools script? Or is that deprecated in favor of CMake (which seems to be the only way I can get the BulletMultiThread lib to build -- otherwise it complains about not being able to find the vectormath library, and then later the MT demo fails with unresolved symbols from this lib).

Thanks
Greg
gjunker
Posts: 12
Joined: Fri Aug 26, 2011 10:32 am

Re: Building and running OpenCL demo in Nvidia platform

Post by gjunker »

NM -- found it through your link to the changes above. Grabbing trunk fixes my NVidia OCL issues, and the cloth demo seems to run fine.

autotools question still valid -- is the configure script deprecated/no-longer-supported? The reason I ask is that even after running autogen.sh in the trunk, I get this:

Code: Select all

make[2]: *** No rule to make target `BulletMultiThreaded/vectormath/scalar/cpp/mat_aos.h', needed by `all-am'.  Stop.
make[2]: Leaving directory `/usr/pic1/gjunker/projects/bullet/build/configure/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/pic1/gjunker/projects/bullet/build/configure'
make: *** [all] Error 2
ProfessionalUser
Posts: 14
Joined: Fri Oct 14, 2011 12:10 am

Re: Building and running OpenCL demo in Nvidia platform

Post by ProfessionalUser »

Same issue here:

make[2]: *** No rule to make target `BulletMultiThreaded/vectormath/scalar/cpp/mat_aos.h', needed by `all-am'. Stop.
make[2]: Leaving directory `[...]/bullet-2.79_64/src/src'
make[1]: *** [all-recursive] Error 1

Does anyone have a solution for this?
gjunker
Posts: 12
Joined: Fri Aug 26, 2011 10:32 am

Re: Building and running OpenCL demo in Nvidia platform

Post by gjunker »

I ended up giving in and just using the CMake build. Otherwise, you end up having to symlink vectormath into the place where the Makefile build is expecting it (or hack on the autotools scripts to make it happen).
Post Reply