[PyCUDA] printf
Bergtholdt, Martin
martin.bergtholdt at philips.com
Fri Mar 25 11:05:04 PDT 2011
Hi,
I'm trying to run the printf example in the wiki:
>>> import pycuda.driver as cuda
>>> import pycuda.autoinit
>>> from pycuda.compiler import SourceModule
>>>
>>> mod = SourceModule("""
... #include <stdio.h>
...
... __global__ void say_hi()
... {
... printf("I am %d.%d\\n", threadIdx.x, threadIdx.y);
... }
... """)
>>>
>>> func = mod.get_function("say_hi")
>>> func(block=(4,4,1))
>>>
Everything works fine, but I do not get any output on the last line. Any ideas what can go wrong here?
Cuda 3.2
Windows-7
pycuda.VERSION (2011, 1)
MSVC 9.0 2008 (32-bit)
________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20110325/c5d4663d/attachment-0001.html>
More information about the PyCUDA
mailing list