Re: [PyOpenCL] How do I turn on the atomics extensions ?
by Andreas Klöckner
On Dienstag 15 Dezember 2009, Michael Rule wrote:
> cool, thanks. Is there documentation somewhere that indicated that?
Not really. Just searching around.
> I still
> get an error which I do not fully understand when I try to use the atomic
> operation.
No idea, sorry.
Andreas
9 years, 11 months
pyopencl installation problem on ubuntu 9.04
by jmoorkan@uci.edu
Hello,
I have been unable to install PyOpenCL on my machine. Any help will be
really appreciated..
Details of my machine : Python 2.6.2, Boost = 1.41.0, gcc = 4.3.3, ubuntu_64
- 9.0.4, NVIDIA GTX-280 with CUDA 2.3 and latest drivers.
I execute the following command for installation...
*>> python configure.py --boost-inc-dir=/usr/local/include/boost/
--boost-lib-dir=/usr/local/lib --cl-inc-dir=/usr/include
--cl-lib-dir=/usr/lib --cl-libname=OpenCL
*
I get the following error...
*Building a Distribute egg in /home/jayram/Project/pyopencl
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/tmpDODqQ1/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/tmpDODqQ1/distribute-0.**6.4/setuptools/dist.py", line 257, in
finalize_options
ep.load()(self, ep.name, value)
File "/tmp/tmpDODqQ1/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/tmpDODqQ1/distribute-0.**6.4/setuptools/dist.py'>
has no 'check_packages' attribute
/home/jayram/Project/pyopencl/**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/jayram/Project/**pyopencl/aksetup_helper.py", line 3, in
<module>
distribute_setup.use_**setuptools()
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 139, in
use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 120, in
_do_download
egg = _build_egg(tarball, to_dir)
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 112, in
_build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
*
Regards,
Jay
9 years, 12 months
Compiling and installing on Ubuntu 9.10
by M.W.
Hi,
I was trying to compile and run pyopencl 0.91.04 on Ubuntu 9.10 with ATI
Stream beta4 as OpenCL library. I managed to adjust the generic
instructions on the wiki (posted it there today) to the ubuntu locations.
It seemed to me that "make" and "make install" worked well, but when I
tried using pyopencl, it was not found.
I noticed, that pyopencl is copied to the wrong folder (for ubuntu):
wrong:
/usr/local/lib/python2.6/dist-packages
correct:
/usr/lib/python2.6/dist-packages
I copied it to the correct location and it didn't solve the problem.
My next guess is that the error message:
/usr/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown
distribution option: 'install_requires'
warnings.warn(msg)
from "make" and "make install" might actually be important. Is it and if
so, how do I fix it?
Also, how many files are to be generated by compiling? Only five end up
in the pyopencl folder: _cl.so, __init__.py, __init__.pyc, version.py,
version.pyc and one in the folder above: pyopencl-0.91.4.egg-info.
Many regards,
Malte
10 years
Possible nitpick with benchmark-all.py
by Keith R. Brafford
In the benchmark-all.py program, it seems that since the inner loop in
the normal CPU
example is over range(1000) :
for i in range(1000):
* for j in range(1000):
* c_result[i] = a[i] + b[i]
c_result[i] = c_result[i] * (a[i] + b[i])
c_result[i] = c_result[i] * (a[i] / 2.0)
....
that the loop that's running inside the kernel should be* <= 1000* instead
of *< 1000*, or perhaps loop should start at zero:
prg = cl.Program(ctx, """
__kernel void sum(__global const float *a,
__global const float *b, __global float *c)
{
int loop;
int gid = get_global_id(0);
* /* for(loop=1; loop<1000;loop++) */
for (loop = 0; loop < 1000; loop++)
* {
c[gid] = a[gid] + b[gid];
c[gid] = c[gid] * (a[gid] + b[gid]);
c[gid] = c[gid] * (a[gid] / 2.0);
}
}
""").build()
Is this observation correct? Or am I still missing something with how these
threads work? (I am new to the OpenCL programming model).
--Keith Brafford
10 years