New to pyCuda, and very excited by the possibilities, I'm
unfortunately having a LaunchError problem with test_driver.py. I have
tried to trace it down using printf() and such, and it seems that the
last push over the cliff is in cuda.hpp
context::prepare_context_switch(), line 505, a cuCtxPopCurrent returns
CUDA_LAUNCH_FAILED -- although CUDA 3.1 Reference Manual p. 412 does
not list it as a possible return but adds that it "may also return
error codes from previous, asynchronous launches.", which I hence
assume is the case.
My rusted C/C++ skills do not allow me to go further, nor to be even
sure that's the real problem.
I'm using PyCUDA as checked out from git tonight, and Cuda 3.1 on
Linux Ubuntu 10.04, with Python 2.6.5, and a brand new Geforce GTX
The GPU is fully functioning: I run all CUDA SDK's examples without a problem.
I also run pyCUDA test_math.py with no problem. (20 passed)
Attached is the output of running
python test_driver.py &>> out
with CUDA_TRACE = 1.
That's how far I've been able to go by myself, so now I'm turning to
you: any help much welcome, thank you ! :)
Julien Cornebise, Ph.D.
Postdoctoral Fellow, University of British Columbia
Yes, I have been full fisted battling with PyCUDA on the macbook pro.
Use macports python2.6 +universal, and macports boost +universal. You will
need to compile as universal because some of the software is 32bit (CUDA if
This will get you very very close. Right now I am running into some
incompatible architecture errors regarding mach-o . When I have a chance I
will post some tips if easily resolved... but I am recovering from some
Regardless I am planning to make a macport of PyCUDA soon(if no one beats
me :), so that users of my own projects will not require hours-days of
hacking to get a PyCUDA to work on a Mac. PyCUDA is very useful so I
was surprised Mac masters have not ported it.
I think macports is the direction to go. Perhaps a mac master can work
through the architecture errors that occur... and assemble a portfile...
else I will do so when I recover.
Please let me know if you reach success!
garrett dot wright at temple dot edu
On Mon, Jul 19, 2010 at 3:00 PM, <pycuda-request(a)tiker.net> wrote:
> Send PyCUDA mailing list submissions to
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> You can reach the person managing the list at
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyCUDA digest..."
> Today's Topics:
> 1. Problem installing boost in Snow Leopard and EPD
> (Andr?s Leonardo Gonz?lez Mancera)
> Message: 1
> Date: Thu, 15 Jul 2010 21:31:29 -0500
> From: Andr?s Leonardo Gonz?lez Mancera <angonzal(a)uniandes.edu.co>
> To: pycuda(a)tiker.net
> Subject: [PyCUDA] Problem installing boost in Snow Leopard and EPD
> Content-Type: text/plain; charset=UTF-8
> Hello all,
> I've been trying to install PyCUDA in a mac pro running the latest
> version of Snow Leopard, Xcode and EPD (32 bits version). I have
> installed cuda driver, toolkit and sdk version 3.1 and verified the
> installation with the included tests.
> I haven't been able to succesfully install boost. I'm following the
> specific instructions for installing on Snow Leopard and EPD available
> on the wiki. I keep getting an error saying that 1 target failed and
> libboost_python is not getting installed. The only way I was able to
> get the python library installed was by using address-model=32 instead
> of the recommended address-model=32_64. Are the instructions on the
> wiki using EPD 64 bits version? I have tried boost 1.42 and 1.42 with
> the same results.
> Is anyone else having this same problem? It seem to me that the
> solution on the wiki resolved the problem of installing boost with my
> particular setup. Any suggestions? Are there any drawback on using the
> 32 bits only version of boost with cuda 3.1?
> Thanks in advance for any suggestions.
> Andr?s Gonz?lez Mancera, Ph.D.
> Profesor Asistente
> Departamento de Ingenier?a Mec?nica
> Universidad de los Andes
> Cra. 1 Este No. 19A-40 ML 625
> Bogot? - Colombia
> + (571) 3394949 ext. 2915
> PyCUDA mailing list
> End of PyCUDA Digest, Vol 25, Issue 9
I've been trying to install PyCUDA in a mac pro running the latest
version of Snow Leopard, Xcode and EPD (32 bits version). I have
installed cuda driver, toolkit and sdk version 3.1 and verified the
installation with the included tests.
I haven't been able to succesfully install boost. I'm following the
specific instructions for installing on Snow Leopard and EPD available
on the wiki. I keep getting an error saying that 1 target failed and
libboost_python is not getting installed. The only way I was able to
get the python library installed was by using address-model=32 instead
of the recommended address-model=32_64. Are the instructions on the
wiki using EPD 64 bits version? I have tried boost 1.42 and 1.42 with
the same results.
Is anyone else having this same problem? It seem to me that the
solution on the wiki resolved the problem of installing boost with my
particular setup. Any suggestions? Are there any drawback on using the
32 bits only version of boost with cuda 3.1?
Thanks in advance for any suggestions.
Andrés González Mancera, Ph.D.
Departamento de Ingeniería Mecánica
Universidad de los Andes
Cra. 1 Este No. 19A-40 ML 625
Bogotá - Colombia
+ (571) 3394949 ext. 2915
750W - the machine was built specifically as a "higher-end gaming
machine" (from a consumer-level PC supplier) - but built for the
office for physics simulations. i3 2.9GHz CPU, 4GB RAM, GTX 480 card,
no other hardware.
The machine is open (has been since Monday evening), I've been
measuring temperatures (48 degrees C at idle, 82 degrees C under 95%
load for 30 minutes) and nothing seems out of the ordinary.
I can run the Nvidia SDK sample programs (e.g. particles, smoke,
waves) and as long as they start, the machine is fine. The problem is
when one of them freezes upon start-up (just as my pyCUDA programs can
freeze on start-up). The machine can be freshly booted and old or
having been under stress for an hour, there's no obvious pattern to
when it will freeze.
I've switched back to my older 9800GT machine which has 197.45
drivers, I'll upgrade that shortly to the latest drivers to see if
that causes instability.
Right now I'm trying to finish some logical patches for pyCUDA before
I'm done with this client for the week.
On 29 June 2010 14:40, Bryan Catanzaro <bryan.catanzaro(a)gmail.com> wrote:
> What kind of power supply do you have?
> - bryan
> On Jun 29, 2010, at 1:43 AM, Ian Ozsvald <ian(a)ianozsvald.com> wrote:
>> Does anyone here successfully run Win XP with a GTX 480 (or 470) with
>> CUDA 3.0/3.1?
>> I upgraded from a 9800GT to the GTX 480 last week (with a whole new
>> machine) and the new machine is very unstable, I'm trying to identify
>> whether it is a hardware issue or the relatively recent drivers from
>> Nvidia. On Friday it hung twice, yesterday it hung 12 times.
>> By 'hung' I mean that if I run the CUDA test programs (from the SDK)
>> then when the program starts - about 1 start in 5 - it'll cause the
>> machine to hang. With pyCUDA it seems to occur more frequently (but
>> maybe this is due to chance) - it happens for test programs (e.g.
>> dump_properties.py, test_gpuarray.py) and my mandelbrot.py demo - all
>> programs seem to cause the crash (but only when the program first
>> starts, if it runs ok then it'll keep running fine).
>> I'm hunting around on the web but I'm not finding any similar
>> problems. This occurs with the latest NVidia drivers (257.21) and CUDA
>> 3.0, also with CUDA 3.1 (in fact the machine seems less stable with
>> CUDA 3.1 - I'm about to downgrade to confirm this).
>> Has anyone seen these kind of symptons before?
>> Ian Ozsvald (A.I. researcher, screencaster)
>> PyCUDA mailing list
Ian Ozsvald (A.I. researcher, screencaster)
Andreas, I'm attaching two patches.
0001 removes the #warning lines in cuda.hpp that make msvc (2008 on WinxP) fail.
0002 adds GPUArray comparisons for == != < > <= >=
Assuming you're cool with the patches I can contribute an updated
Mandelbrot.py where a reasonable speed-up is obtained using pure
Python/GPUArray(numpy-like) operators rather than having to implement
a pure .cu solution. This GPUArray solution sits between a numpy (CPU)
speed-up and the pure .cu code version. It'll make for a good demo for
pure-Python folk (like my boss).
The above is tested on WinXP 32 bit, pyCUDA 0.94 RC (latest), CUDA 3.0
with 9800GT. The original code with Mandelbrot solution was developed
on my new (but crashy) WinXP 32 bit box with pyCUDA 0.94 RC (latest),
CUDA 3.1 and 480 GTX.
Ian Ozsvald (A.I. researcher, screencaster)
A pre-alpha release of PyCULA, which provides support for the CULA port of
LAPACK to CUDA is available from:
The main features are:
* ctypes/numpy bindings for the parts of LAPACK supported in CULA
* A PyCUDA/GPUArray interface for the CULA device functions
* Mixing PyCUDA kernel code with LACPACK calls
This is a preview with some rough edges, but it is in a state where it's
useful for applications that require LAPACK functionality.
Research Assistant Professor
Math Department, Temple University