hi,
ive been endlessly trying to install pycuda on a red hat dist. machine, but
to no avail. it would be much appreciated if i could get some help.
i am able to get past the configure part of the installation, but the when i
"make" , the problem occurs. here is my siteconf.py file
BOOST_INC_DIR = ['/usr/local/include/boost/']
BOOST_LIB_DIR = ['/usr/lib']
BOOST_COMPILER = 'gcc4.1.2'
BOOST_PYTHON_LIBNAME = ['boost_python']
BOOST_THREAD_LIBNAME = ['boost_thread']
CUDA_TRACE = False
CUDA_ROOT = '/usr/local/cuda/'
CUDA_ENABLE_GL = False
CUDADRV_LIB_DIR = ['/usr/lib']
CUDADRV_LIBNAME = ['cuda']
CXXFLAGS = ['-DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = []
i beleive i built boost with gcc version 4.1.2
the error im getting is.....
/usr/local/include/boost/type_traits/remove_const.hpp:61: instantiated
from ‘boost::remove_const<<unnamed>::pooled_host_allocation>’
/usr/local/include/boost/python/object/pointer_holder.hpp:127:
instantiated from ‘void* boost::python::objects::pointer_holder<Pointer,
Value>::holds(boost::python::type_info, bool) [with Pointer =
std::auto_ptr<<unnamed>::pooled_host_allocation>, Value =
<unnamed>::pooled_host_allocation]’
src/wrapper/mempool.cpp:278: instantiated from here
/usr/local/include/boost/type_traits/detail/cv_traits_impl.hpp:38: internal
compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
i only included the ends. if you want the entire thing let me know. but the
error seems to point to a gcc problem. ive read thru
your archives but doesnt seem to solve this problem
if someone could shed some light on this issue, i would very appreciate it.
thanks
-nhieu
Hi everybody,
I am new on PyCuda. I just installed everything on Windows XP and, from the installation log, I think that I did it properly. However, I tried to run the test files provided with pycuda and I get this error
Traceback (most recent call last):
File "C:\PyCuda\test\test_gpuarray.py", line 2, in <module>
import pycuda.autoinit
File "C:\PyCuda\pycuda\autoinit.py", line 1, in <module>
import pycuda.driver as cuda
File "C:\PyCuda\pycuda\driver.py", line 1, in <module>
from _driver import *
ImportError: No module named _driver
how can I solve it?
thanks and sorry for the newbieness of this post
den3b
_________________________________________________________________
I tuoi amici sempre a portata di clic, sul nuovo Web Messenger
http://www.windowslive.it/foto.aspx
Given that the latest revision of PyCUDA apparently needs to remove
setuptools before downloading and installing distribute, is it
effectively no longer possible to build/install PyCUDA locally (i.e.,
within a user directory) on a Linux system? If I run configure.py as a
non-root user, setuptools obviously can't be removed if it is
installed globally.
L.G.
Hello - I'm running pycuda (linux), and I can run many of the examples and those from the wiki-examples without a problem. However, I can't seem to get 'SparseSolve.py' to run with a mtm matrix file as arg[0].
- python SparseSolve.py example_5pt_10x10.mtx
starting...
building...
Traceback (most recent call last):
File "SparseSolve.py", line 85, in <module>
main_cg()
File "SparseSolve.py", line 31, in main_cg
from pycuda.sparse.packeted import PacketedSpMV
ImportError: No module named sparse.packeted
Does this require installation of the 'iterative-cuda' package? Thanks for any suggestions. Cheers,
#########################################
Brian Menounos, associate professor
Geography Program and Natural Resources and Environmental Studies Institute
University of Northern British Columbia
3333 University Way
Prince George, BC, V2N 4Z9
tel: 250-960-6266
fax: 250-960-6533
email: menounos(a)unbc.ca
web: http://web.unbc.ca/~menounos/
#########################################
Hi everyone,
I recently got a new MacBook Pro running Snow Leopard, and I'm
trying to install PyCuda 0.94 on a 64-bit install of python 2.6. The
installation seems to have worked, but I'm getting weird results and
crashes on simple programs.
For example, consider the trivial program below:
import pycuda.autoinit
import pycuda.driver as drv
import numpy
from pycuda.compiler import SourceModule
mod = SourceModule("""
__global__ void setit(int *dest, int *a)
{
const int i = threadIdx.x;
dest[i] = a[i];
}
""")
setit = mod.get_function("setit")
a = numpy.zeros(10).astype(numpy.int32)
dest = numpy.zeros(10).astype(numpy.int32)
print dest # Should be all zeros
setit(drv.Out(dest), drv.In(a), block=(10,1,1))
print dest # Should still be all zeros
This ought to print only zeros, because all it does is copy one array
of all zeros into another array of all zeros. Instead it prints:
[0 0 0 0 0 0 0 0 0 0]
[-16576992 -16445665 -16641753 -16575962 -16445152 -16575708 -16575451
-16641242 -16640984 -16640983]
Oddly, if I replace "a[i]" with "i" in the kernel source, it works
fine (producing [0 1 2...9]), so the problem seems to be that it can't
read from a.
Moreover, I added the following:
from pycuda import gpuarray
a = gpuarray.zeros(10, numpy.int32)
dest = gpuarray.zeros(10, numpy.int32)
setit(dest, a, block=(10,1,1))
print dest # Should STILL be all zeros
and running it froze my graphics card.
I've tested this code on a different machine and had no problem. Has
anyone run into this before?
Thanks,
Dan Lepage
Bonjour,
I'm using UBUNTU 9.10 64bit distro on a NVDIA based laptop (Sony F11).
CUDA 3.0 has been installed and woks perfectly.
I have tried to install "stable" pycuda-0.93.tar.gz using the instructions
available on your web site (including gcc downgrade) without success.
I have tried also to install "git" version
In both cases the error looks the same (see below for the details). I have
tried all the hints available on-line without success.
Where is the mistake ?
Do you suggest to concentrate on 0.93, git or whatever?
Do I need to use another distro? 10.04 is incompatible with NVDIA-CUDA
driver, so I have stepped back to 9.10 (suggested by NVIDIA).
I'm a really green on Python, so I'm feeling lost. Pycuda looks great. I'm
working on thermonuclear fusion simulation (www.iter.org) using custom MHD
code: Pycuda could simplify A LOT the development.
Thanks in advance for your help
Simone Mannori - ENEA Brasimone - INRIA Rocquencourt
www.scicos.org - www.scicoslab.org
//++++++++++++++++++++++++++++++++++++++++++++++
simone@vaio:~/svn/pycuda/pycuda$ ./configure.py
Scanning installed packages
Setuptools installation detected at /home/simone/svn/pycuda/pycuda
Non-egg installation
Removing elements out of the way...
Already patched.
/home/simone/svn/pycuda/pycuda/setuptools-0.6c9-py2.6.egg-info already
patched.
Extracting in /tmp/tmpF6gEju
Now working in /tmp/tmpF6gEju/distribute-0.6.4
Building a Distribute egg in /home/simone/svn/pycuda/pycuda
Traceback (most recent call last):
File "setup.py", line 142, in <module>
scripts = scripts,
File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/tmpF6gEju/distribute-0.6.4/setuptools/dist.py", line 224, in
__init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.6/distutils/dist.py", line 270, in __init__
self.finalize_options()
File "/tmp/tmpF6gEju/distribute-0.6.4/setuptools/dist.py", line 257, in
finalize_options
ep.load()(self, ep.name, value)
File "/tmp/tmpF6gEju/distribute-0.6.4/pkg_resources.py", line 1922, in
load
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'setuptools.dist' from
'/tmp/tmpF6gEju/distribute-0.6.4/setuptools/dist.py'> has no
'check_packages' attribute
/home/simone/svn/pycuda/pycuda/setuptools-0.6c9-py2.6.egg-info already
exists
Traceback (most recent call last):
File "./configure.py", line 3, in <module>
from aksetup_helper import configure_frontend
File "/home/simone/svn/pycuda/pycuda/aksetup_helper.py", line 3, in
<module>
distribute_setup.use_setuptools()
File "/home/simone/svn/pycuda/pycuda/distribute_setup.py", line 139, in
use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "/home/simone/svn/pycuda/pycuda/distribute_setup.py", line 120, in
_do_download
egg = _build_egg(tarball, to_dir)
File "/home/simone/svn/pycuda/pycuda/distribute_setup.py", line 112, in
_build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
simone@vaio:~/svn/pycuda/pycuda$
This tip only applies if you're:
On Windows
Writing a COM (Component Object Model) wrapper for pyCUDA
Using pywin32 for COM
My goal is to write a COM wrapper for my physics CUDA code (written in
pyCUDA using a SourceModule) so I can talk to it from MSVC and Excel.
The problem this tip solves is that by default a pywin32 COM module
runs both InProc (In Process) and as a LocalServer (as an exe out of
the calling process).
For whatever reason the InProc execution policy causes an '80004005'
error when you try to call a pyCUDA module over COM. The lack of a
hint has cost me a day to solve this problem so, if you're doing this,
add the following line to your COM specification so your module runs
purely as a LocalServer and the error won't occur:
_reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER
(and "import pythoncom" somewhere above)
If the above doesn't make sense then see:
http://oreilly.com/catalog/pythonwin32/chapter/ch12.html#51294
for a guide to a simple COM wrapper, just add the _reg_clsctx_ line
after _reg_clsid_ from the example.
Ian.
--
Ian Ozsvald (A.I. researcher, screencaster)
ian(a)IanOzsvald.com
http://IanOzsvald.comhttp://MorConsulting.com/http://blog.AICookbook.com/http://TheScreencastingHandbook.comhttp://FivePoundApp.com/http://twitter.com/IanOzsvald
Dear All,
I had problems of memory leakage when I used python
multithreading with pycuda. The gpu memory was not totally freed even
after the thread has ended, which caused problems with allocating memory
and starting the next thread. This problem is already mentioned in the
FAQ which I think is mainly due to the memory sharing nature of
multithreads in python. So I planned to try python multiprocessing.
After a lot of hard work, got 2d-fft to work with pyfft,
pycuda and multiprocessing. It is so much encouraging that it solved the
problem of memory leak which I faced when using multi-threading.
I have uploaded the python source code for the same
to /PyCuda/Examples/2DFFT. The code uses transpose-split method for the
FFT, inorder to accomodate larger sizes and multiprocessing.
I believe that the code could still be imporved for better
prefomance. I would be happy and encourage any one willing to develop on
my code.
Since FFT is the most used and also the most time consuming
(when it comes to large sizes), I hope improvement to this code will
help the PYCUDA community a lot.
Eagerly waiting for some comments !!
regards,
Jackin