Hi Andreas
On 3/8/12 8:15 PM, Andreas Kloeckner wrote:
<#part sign=pgpmime>
On Thu, 08 Mar 2012 14:48:20 +0100, Karsten Wiesner<[email protected]>
wrote:
On 3/8/12 1:55 AM, Andreas Kloeckner wrote:
<#part sign=pgpmime>
Hi Alex, Karsten,
On Wed, 7 Mar 2012 16:43:22 -0500, Alex Nitz<[email protected]> wrote:
This is what I am getting on an NVIDIA GTX580.
[snip]
:20:20: error: can't convert between vector values of different size
('cfloat_t __attribute__((address_space(1)))' (aka 'float2
__attribute__((address_space(1)))') and 'double')
z[i] = cfloat_cast(a*x[i]) + cfloat_cast(b);
^~~~~~~~~~~~~~~~~~~
:20:33: note: instantiated from:
z[i] = cfloat_cast(a*x[i]) + cfloat_cast(b);
I've committed what I think might be a workaround for this to git. Can
you please try it out and report back?
Andreas
PS.:
the same occures on a MAC with the Apple Framework:
0]<pyopencl.Device 'GeForce GT 330M' on 'Apple' at 0x1022600>
[1]<pyopencl.Device 'Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz'
on 'Apple' at 0x1020400>
Which Framework do you use? It might occure only on Nvidia and Apple
Can you try again with the current git version? I just cleaned up a big
bunch of these issues.
Andreas
The original error is probably fixed but I observe other platform
dependent problems (I attached the test program):
@Mac:
ip74:pycbc-pycuda-pyopencl-tb kawies$ python divtest.py
/Users/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-macosx-10.6-x86_64.egg/pyopencl/__init__.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.pyc
Choose device(s):
[0] <pyopencl.Device 'GeForce GT 330M' on 'Apple' at 0x1022600>
[1] <pyopencl.Device 'Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz'
on 'Apple' at 0x1020400>
Choice, comma-separated [0]:1
Set the environment variable PYOPENCL_CTX='1' to avoid being asked again.
<pyopencl.Context at 0x102615630 on <pyopencl.Device 'Intel(R) Core(TM)
i5 CPU M 540 @ 2.53GHz' on 'Apple' at 0x1020400>>
<pyopencl._cl.CommandQueue object at 0x1023d0628>
carr on host: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
garr on gpu: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
Traceback (most recent call last):
File "divtest.py", line 26, in <module>
res= garr / 5
File
"/Users/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-macosx-10.6-x86_64.egg/pyopencl/array.py",
line 641, in __div__
common_dtype = _get_common_dtype(self, other, self.queue)
File
"/Users/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-macosx-10.6-x86_64.egg/pyopencl/array.py",
line 50, in _get_common_dtype
has_double_support(queue.device))
TypeError: get_common_dtype() takes exactly 2 arguments (3 given)
@debian
kawies@gpudev1:~/dev-testbenches/pycbc-pycuda-pyopencl-tb$ python
divtest.py
/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/__init__.pyc
/usr/lib/pymodules/python2.6/numpy/__init__.pyc
Choose device(s):
[0] <pyopencl.Device 'Tesla C2050' on 'NVIDIA CUDA' at 0x254f930>
[1] <pyopencl.Device 'Tesla C1060' on 'NVIDIA CUDA' at 0x2150450>
[2] <pyopencl.Device 'nForce 980a/780a SLI' on 'NVIDIA CUDA' at 0x2509290>
Choice, comma-separated [0]:0
Set the environment variable PYOPENCL_CTX='0' to avoid being asked again.
<pyopencl.Context at 0x24e5bd0 on <pyopencl.Device 'Tesla C2050' on
'NVIDIA CUDA' at 0x254f930>>
<pyopencl._cl.CommandQueue object at 0x26013c0>
carr on host: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
garr on gpu: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
Traceback (most recent call last):
File "divtest.py", line 26, in <module>
res= garr / 5
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 641, in __div__
common_dtype = _get_common_dtype(self, other, self.queue)
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 50, in _get_common_dtype
has_double_support(queue.device))
TypeError: get_common_dtype() takes exactly 2 arguments (3 given)
kawies@gpudev1:~/dev-testbenches/pycbc-pycuda-pyopencl-tb$ python
divtest.py
/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/__init__.pyc
/usr/lib/pymodules/python2.6/numpy/__init__.pyc
Choose device(s):
[0] <pyopencl.Device 'Tesla C2050' on 'NVIDIA CUDA' at 0x1492930>
[1] <pyopencl.Device 'Tesla C1060' on 'NVIDIA CUDA' at 0x1093450>
[2] <pyopencl.Device 'nForce 980a/780a SLI' on 'NVIDIA CUDA' at 0x144c290>
Choice, comma-separated [0]:1
Set the environment variable PYOPENCL_CTX='1' to avoid being asked again.
<pyopencl.Context at 0x1428bd0 on <pyopencl.Device 'Tesla C1060' on
'NVIDIA CUDA' at 0x1093450>>
<pyopencl._cl.CommandQueue object at 0x15443c0>
carr on host: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
garr on gpu: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
Traceback (most recent call last):
File "divtest.py", line 26, in <module>
res= garr / 5
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 641, in __div__
common_dtype = _get_common_dtype(self, other, self.queue)
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 50, in _get_common_dtype
has_double_support(queue.device))
TypeError: get_common_dtype() takes exactly 2 arguments (3 given)
kawies@gpudev1:~/dev-testbenches/pycbc-pycuda-pyopencl-tb$ python
divtest.py
/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/__init__.pyc
/usr/lib/pymodules/python2.6/numpy/__init__.pyc
Choose device(s):
[0] <pyopencl.Device 'Tesla C2050' on 'NVIDIA CUDA' at 0xfde930>
[1] <pyopencl.Device 'Tesla C1060' on 'NVIDIA CUDA' at 0xbdf450>
[2] <pyopencl.Device 'nForce 980a/780a SLI' on 'NVIDIA CUDA' at 0xf98290>
Choice, comma-separated [0]:2
Set the environment variable PYOPENCL_CTX='2' to avoid being asked again.
<pyopencl.Context at 0xf74bd0 on <pyopencl.Device 'nForce 980a/780a SLI'
on 'NVIDIA CUDA' at 0xf98290>>
<pyopencl._cl.CommandQueue object at 0x10903c0>
carr on host: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
garr on gpu: [[ 5.+0.j 0.+0.j]
[ 0.+0.j 0.+0.j]]
Traceback (most recent call last):
File "divtest.py", line 26, in <module>
res= garr / 5
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 641, in __div__
common_dtype = _get_common_dtype(self, other, self.queue)
File
"/home/kawies/local/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py",
line 50, in _get_common_dtype
has_double_support(queue.device))
TypeError: get_common_dtype() takes exactly 2 arguments (3 given)
kawies@gpudev1:~/dev-testbenches/pycbc-pycuda-pyopencl-tb$
import pyopencl as _cl
import pyopencl.array as _clarray
import numpy as _numpy
from numpy import float32,float64,complex64,complex128
print _cl.__file__
print _numpy.__file__
cl_context = _cl.create_some_context()
print cl_context
cl_queue = _cl.CommandQueue(cl_context)
print cl_queue
carr= _numpy.zeros(shape=(2,2), dtype=complex64)
carr[0,0]= 5
print "carr on host: {0}".format(carr)
garr= _clarray.to_device(cl_queue, carr)
print "garr on gpu: {0}".format(garr)
res= garr / 5
print "result on gpu: {0}".format(res)
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl