First off, if you have support questions, please go via the PyCUDA mailing
list. I've CC'ed them on this reply.
On Freitag 12 Juni 2009, you wrote:
> Hello Andreas, I'm Luiz from Brazil.
BOOST_COMPILER was introduced in the 0.93 release cycle--the instructions
you're following do not match the version you're using, which is 0.92. I'd
suggest you try version 0.93rc4, from here:
I need to apply an affine warping to an image and use the result in
CUDA. What sounds like a better idea:
1) Write a CUDA kernel to do the filtering and interpolation, perhaps
using texture memory for the source image.
2) Try to figure out how to get the image into OpenGL and try to do
the image re-sampling there. I know OpenGL is meant for operations
like this, but I have no idea how hard it will be to get things
working from python.
3) Just do the warping on the CPU side using, say, OpenCV or
scipy.ndimage.affine_transform, and then transferring the data to the
GPU for the rest of my CUDA pipeline
The source image is 1024 x 768 single channel, getting resampled down
to 64 x 80 using a transformation matrix that gets computed online. I
have pretty minimal OpenGL experience, and none in a python context.
I know that when a call is made to a CUDA kernel, control immediately
returns to the calling function or program. But if I then immediately call a
memcpy from the changed gpu array to an array on the host, will the call
wait for the kernel to finish before executing the memcpy?
After pycuda installation I ran some examples provided. Every time I
run them, I get the following message:
diskdict.py:119: UserWarning: DiskDict will memory-only: a usable
version of sqlite was not found.
warnings.warn("DiskDict will memory-only: "
Any ideas what is wrong here? Thanks in advance.
I went through the pycuda documentation and it seems the equivalent function
Is this accurate?
I need this to block kernel calls in python, to measure kernel execution
Attempting Hua Wong's simple squaring kernel with timing posted to the
list Thu, 28 May 2009 12:55:13, I get a cuMemAlloc failed: out of
memory error referring to gpuarray.py line 81--> self.gpudata =
self.allocator(self.size * self.dtype.itemsize)
Also, updating the recent tests from one user's perspective on FC10,
Python 2.5.2, Boost 1.39, Cuda 2.2 and a 9800 GTX+.
test_abstract_array.py passes with no output
test_math.py fails (errors=1)
Traceback (most recent call last):
File "test_math.py", line 76, in test_modf
fracpart, intpart = cumath.modf(a)
line 90, in modf
func = elementwise.get_modf_kernel()
File "<string>", line 1, in <lambda>
line 131, in memoize
result = func(*args)
line 364, in get_modf_kernel
line 89, in get_elwise_kernel
arguments, operation, name, keep, options)
line 70, in get_elwise_kernel_and_types
arguments = [parse_c_arg(arg) for arg in arguments.split(",")]
line 362, in parse_c_arg
raise ValueError("couldn't parse C declarator '%s'" % c_arg)
ValueError: couldn't parse C declarator ' float *intpart '
test_texture_nan.py passes with no output
A number of the undistributed are problematic as well. Can send errors
if list wishes.
Vince Fulco, CFA, CAIA
On Mittwoch 03 Juni 2009, Marcel Krause wrote:
> Hello Andreas, hello list,
> > You BOOST_PYTHON_LIBNAME is likely wrong--it refers to "gcc",
> > and you're compiling with msvc.
> thanks, I fixed it to "boost_python-vc90-mt". There's only a file
> "libboost_python-vc90-mt.lib" in the path I have as BOOST_LIB_DIR,
> so is the "lib" added automatically before the filename?
It is on Unix. Not sure about Windows.
> MSVC did indeed give more error messages, it was my fault that I
> used a wrong setting to redirect its output to a file. Here's the
> full error report: http://paste.nn-d.de/914 It's in german since
> I use a german version of MSVC, but maybe it helps nonetheless.
Oh my, that's all in Boost. That's good news in principle, since it's all
supposed to work--the Boost docs say it should. You're using VC 9, I take it?
I think we're best advised trying to track down that syntax error first. Is
there a way of having MSVC print the include path that got it to the point
where an error occurred?
> For the siteconf.py, I'd appreciate a method to test its validity,
> e.g. try to find important files using the pathes therein, and if
> they are not found, warn me and tell me where it hat expected them
> so I can search for the file and correct the path. I could try and
> write such a verifier script if someone tells me which files are
> expected in which paths.
Oh, sweet. I'll take you up on that offer.
On Freitag 05 Juni 2009, Chris Heuser wrote:
> The boost warning worked. But I am confused, since I have version 1.37 of
> boost installed. I will install 1.39, but 1.37 should work, shouldn't it?
My guess here is that you installed 1.37 manually, and you also have an old
set (maybe 1.34) installed through Fedora's package management. Apparently,
the system-wide set gets picked up instead of the manually-compiled one.
I have installed pycuda several times before, but never in Fedora (10). I
have worked my way through almost to the end, but I do not know how to get
past this error:
building '_driver' extension
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
-mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -O3 -DNDEBUG
-fPIC -Isrc/cpp -I/usr/include -I/usr/local/cuda/include
-I/usr/include/python2.5 -c src/cpp/cuda.cpp -o
In file included from src/cpp/cuda.cpp:1:
src/cpp/cuda.hpp:311: error: ‘id’ in class ‘boost::thread’ does not name a
src/cpp/cuda.hpp:346: error: ‘id’ in class ‘boost::thread’ does not name a
src/cpp/cuda.hpp: In constructor ‘cuda::context::context(CUctx_st*)’:
src/cpp/cuda.hpp:316: error: class ‘cuda::context’ does not have any field
src/cpp/cuda.hpp:316: error: ‘boost::this_thread’ has not been declared
src/cpp/cuda.hpp: In member function ‘void cuda::context::detach()’:
src/cpp/cuda.hpp:359: error: ‘m_thread’ was not declared in this scope
src/cpp/cuda.hpp:359: error: ‘boost::this_thread’ has not been declared
src/cpp/cuda.hpp: In constructor
src/cpp/cuda.hpp:529: error: ‘boost::this_thread’ has not been declared
src/cpp/cuda.hpp:529: error: ‘class cuda::context’ has no member named
error: command 'gcc' failed with exit status 1
Any help would be greatly appreciated!
On Mittwoch 03 Juni 2009, you wrote:
> Dear Andreas,
> thanks for the file location list. With it I was able to complete
> my siteconf.py. Attached you find my verifier script. It is tested
> only on Windows, but I think it should work on linux as well.
> Feel free to distribute it under any license you like.
Thanks for submitting this. It's now done by default at the beginning of
setup.py in git master and the 0.93 release branch.