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
No idea, sorry.
I have been unable to install PyOpenCL on my machine. Any help will be
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/
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
File "/usr/lib/python2.6/distutils/**dist.py", line 270, in __init__
File "/tmp/tmpDODqQ1/distribute-0.**6.4/setuptools/dist.py", line 257, in
ep.load()(self, ep.name, value)
File "/tmp/tmpDODqQ1/distribute-0.**6.4/pkg_resources.py", line 1922, in
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'setuptools.dist' from
has no 'check_packages' attribute
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
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 139, in
return _do_download(version, download_base, to_dir, download_delay)
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 120, in
egg = _build_egg(tarball, to_dir)
File "/home/jayram/Project/**pyopencl/distribute_setup.py", line 112, in
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
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):
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'
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.
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 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);
Is this observation correct? Or am I still missing something with how these
threads work? (I am new to the OpenCL programming model).