On Dec 9, 2008, at 4:36 PM, Nicholas Piël wrote:
On Dec 9, 2008, at 10:27 PM, Randy Heiland wrote:
Replying to my own post, I now realize that when I downloaded what I
thought was the driver from:
http://www.nvidia.com/object/cuda_get.html
in fact, the 'driver' button for 'Mac OS' was totally missing (I
mistakenly that the 'toolkit' included the driver.
So, when I try to run one of the example pgms from the SDK, I get,
e.g.
/Developer/CUDA/bin/darwin/release$ ./Mandelbrot
Using device 0: Device Emulation (CPU)
Compute capability 9999.9999
Data init done.
Initializing GLUT...
Loading extensions: No error
OpenGL window created.
Starting GLUT main loop...
Press [?] to print location and scale
Press [q] to exit
...
and I get a black window.
Any comments? Anyone know the status of CUDA drivers for OSX?
Do the installation procedure again (of the cuda toolkit), then click
on 'customize' and tick the box in front of the kernel extension.
I think that'll work!
Cheers,
Nicholas
Bingo! That was the trick I needed - thanks!
Now, I can run/see the Mandelbrot and other pgms in the CUDA SDK. And
I can do:
Python 2.6 (r26:66714, Nov 14 2008, 14:37:46)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycuda.driver as drv
>>> drv.init()
>>>
However, trying to run some of the pycuda examples seem problematic:
heiland:~/Documents/workspace/pycuda/examples$ python demo.py
[[ 1.46184683 1.11751497 -5.8999877 -7.09263182]
[-0.39740902 0.94425917 -0.61876231 0.38862616]
[-2.40514922 2.16720867 -0.15235817 -0.51888126]
[ 0.07973941 1.79443252 1.62692916 1.70564294]]
[[ 0.73092341 0.55875748 -2.94999385 -3.54631591]
[-0.19870451 0.47212958 -0.30938116 0.19431308]
[-1.20257461 1.08360434 -0.07617909 -0.25944063]
[ 0.03986971 0.89721626 0.81346458 0.85282147]]
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 3.00927702e-36]
[ 1.59078493e-33 4.74793215e-38 1.88079096e-37 4.51463371e-36]
[ 0.00000000e+00 1.88079096e-37 7.70560149e-34 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 1.88470114e-37 0.00000000e+00]]
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 3.00927702e-36]
[ 1.59078493e-33 4.74793215e-38 1.88079096e-37 4.51463371e-36]
[ 0.00000000e+00 1.88079096e-37 7.70560149e-34 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 1.88470114e-37 0.00000000e+00]]
terminate called after throwing an instance of 'cuda::error'
what(): cuMemFree failed: invalid value
Abort trap
heiland:~/Documents/workspace/pycuda/examples$ python test_math_speed.py
compile kernels
/usr/local/lib/python2.6/site-packages/pycuda-0.91-py2.6-macosx-10.3-
i386.egg/pycuda/driver.py:331: UserWarning: kernel uses local memory
warn("kernel uses local memory")
calculating: 2
Traceback (most recent call last):
File "test_math_speed.py", line 108, in <module>
gpu_time = time_gpu_execution(size,method,argCount)
File "test_math_speed.py", line 48, in time_gpu_execution
a = cuda.array(size)+1
File "/usr/local/lib/python2.6/site-packages/pycuda-0.91-py2.6-
macosx-10.3-i386.egg/pycuda/gpuarray.py", line 524, in array
return fill((size,),value)
File "/usr/local/lib/python2.6/site-packages/pycuda-0.91-py2.6-
macosx-10.3-i386.egg/pycuda/gpuarray.py", line 529, in fill
result.fill(value)
File "/usr/local/lib/python2.6/site-packages/pycuda-0.91-py2.6-
macosx-10.3-i386.egg/pycuda/gpuarray.py", line 325, in fill
kernel._get_fill_kernel()(numpy.float32(value), self.gpudata,
numpy.int32(self.size),**self._kernel_kwargs
File "/usr/local/lib/python2.6/site-packages/pycuda-0.91-py2.6-
macosx-10.3-i386.egg/pycuda/driver.py", line 107, in function_call
func.set_block_shape(*block)
RuntimeError: cuFuncSetBlockShape failed: invalid handle
-Randy
_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net