[PyCuda] Complete recipe for PyCUDA?
drewm1980 at gmail.com
Fri May 8 12:13:28 PDT 2009
Thanks for the quick replies everyone!
Right now on my machine (Quad core Xeon Mac Pro) I'm using the ATI
card that came with the machine to drive my display, and using an
NVIDIA 8800 GT for Cuda. Can the NVIDIA and ATI drivers coexist in
linux, or should I pull out the ATI card and just use the NVIDIA card
for both my display and my Cuda work? In Ubuntu, the gui tool for
selecting hardware drivers won't let me enable both the ATI driver and
NVIDIA driver simultaneously. Does this only apply for the currently
running X session?
Should I be using NVIDIA's installer for their display drivers, or
should I be using non-free packages from apt? On Debian/Ubuntu, is
the cuda driver independent from the display driver, or are they
On Fri, May 8, 2009 at 1:49 PM, Minjae Kim <the.minjae+pc at gmail.com> wrote:
> Hi, Shwetank,
> So, after installing CUDA driver, install Boost and Numpy
> sudo apt-get install libboost-python1.35-dev python-numpy
> then PyCuda 0.93 can be downloaded from the PyCuda website.
> Extract it and go to its folder and type
> Then, edit "siteconf.py" file to following (assuming you are using default
> installation paths)
> BOOST_INC_DIR = ['/usr/include/boost/']
> BOOST_LIB_DIR = ['/usr/lib']
> BOOST_PYTHON_LIBNAME = ['boost_python-mt-py26']
> BOOST_THREAD_LIBNAME = ['boost_thread-gcc43-mt-1_35']
> CUDA_TRACE = False
> CUDADRV_LIB_DIR = 
> CUDADRV_LIBNAME = ['cuda']
> CXXFLAGS = 
> LDFLAGS = 
> CUDA_ROOT = '/usr/local/cuda/'
> then, the final step is
> python setup.py build
> sudo make install
> To test your installation,
> cd test
> python test_driver.py
> I hope that helps. Feel free to let me know if that works (or not).
> On Fri, May 8, 2009 at 2:26 PM, Shwetank Kumar <shwetank.kumar at gmail.com>
>> Hi Minjae,
>> I am new to Linux and have just started using Ubuntu 9.04. When I repeat
>> Andreas' instructions I am getting the following error when I run install:
>> ctags -R src || true
>> /usr/bin/python setup.py install
>> running install
>> running bdist_egg
>> running egg_info
>> writing requirements to pycuda.egg-info/requires.txt
>> writing pycuda.egg-info/PKG-INFO
>> writing top-level names to pycuda.egg-info/top_level.txt
>> writing dependency_links to pycuda.egg-info/dependency_links.txt
>> reading manifest file 'pycuda.egg-info/SOURCES.txt'
>> reading manifest template 'MANIFEST.in'
>> writing manifest file 'pycuda.egg-info/SOURCES.txt'
>> installing library code to build/bdist.linux-i686/egg
>> running install_lib
>> running build_py
>> creating build
>> creating build/lib.linux-i686-2.6
>> creating build/lib.linux-i686-2.6/pycuda
>> copying src/python/tools.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/curandom.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/gpuarray.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/driver.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/cumath.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/autoinit.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/rt.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/elementwise.py -> build/lib.linux-i686-2.6/pycuda
>> copying src/python/__init__.py -> build/lib.linux-i686-2.6/pycuda
>> running build_ext
>> building '_driver' extension
>> creating build/temp.linux-i686-2.6
>> creating build/temp.linux-i686-2.6/src
>> creating build/temp.linux-i686-2.6/src/cpp
>> creating build/temp.linux-i686-2.6/src/wrapper
>> gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC
>> -Isrc/cpp -I/home/shwetank/pool/include/boost-1_35
>> -I/usr/include/python2.6 -c src/cpp/cuda.cpp -o
>> gcc: error trying to exec 'cc1plus': execvp: No such file or directory
>> error: command 'gcc' failed with exit status 1
>> make: *** [install] Error 1
>> Could you please send the list of instructions you used to set up pycuda?
>> On Fri, May 8, 2009 at 2:20 PM, Raefer Gabriel <raefer at raefer.com> wrote:
>>> PyCUDA working on Ubuntu 9.04 here as well.
>>> Had to apt-get install the Boost 1.35 libraries (as I recall, something
>>> "apt-get install libboost1.35-dev", not the basic libboost-dev package,
>>> which is still based on 1.34).
>>> And I had to switch to gcc-4.1 to build CUDA 2.1 (found instructions in
>>> I wish I had documented the exact steps. I don’t recall any other major
>>> issues though (there were definitely one or two other minor tweaks, but
>>> easily solvable with the help of Google).
>>> From: pycuda-bounces at tiker.net [mailto:pycuda-bounces at tiker.net] On
>>> Of Minjae Kim
>>> Sent: Friday, May 08, 2009 2:15 PM
>>> To: Andreas Klöckner
>>> Cc: pycuda at tiker.net
>>> Subject: Re: [PyCuda] Complete recipe for PyCUDA?
>>> I am using Ubuntu 9.04 and PyCuda 0.93. I have no issues now. I do have
>>> (different) recipe for installing it on Ubuntu; if the one online does
>>> work well, feel free to let me know.
>>> I myself moved away from MATLAB+Windows for research purposes. Somehow I
>>> never could install PyCuda on Windows without Visual Studio 2003. Ubuntu
>>> installation is smoother.
>>> On Fri, May 8, 2009 at 2:11 PM, Andreas Klöckner
>>> <lists at informa.tiker.net>
>>> On Freitag 08 Mai 2009, Andrew Wagner wrote:
>>> > Hello-
>>> > Is there a recipe out there for getting PyCUDA (including
>>> > dependencies!) up and running that is known to just work?
>>> > I'm hopeful that if I can get PyCUDA installed properly, it will
>>> > become my primary research tool. I used MATLAB exclusively for
>>> > and loved it. Once that became impossible for performance
>>> > switched to C++ and CUDA. Now my code runs a lot faster, but
>>> > about 1/20th as productive as I was with MATLAB. Since I'm
>>> > this will be my primary research tool, I'm willing to do a
>>> > install of any OS (though I prefer anything but windows, and
>>> > slight preference for mac or debian).
>>> > Even if there is no well-tested recipe, I'd appreciate guidance
>>> > what platforms, package managers, library versions, etc... are
>>> > supported. I already spent a couple days tinkering with this,
>>> > plan to devote up to a week more, starting in about one week.
>>> > been using cuda on OS X for about a semester, but I'm pretty new
>>> > python.
>>> on Debian Lenny or Ubuntu 8.10 should "just work", as in, copy and
>>> paste the
>>> commands, wait, and you're done. I use Debian myself.
>>> On that note, any news with respect Ubuntu 9.04? Is that working
>>> now? Or
>>> are there still issues?
>>> PyCuda mailing list
>>> PyCuda at tiker.net
>>> PyCuda mailing list
>>> PyCuda at tiker.net
> PyCuda mailing list
> PyCuda at tiker.net
More information about the PyCUDA