[PyCUDA] test_gpuarray.py errors
Chethan Pandarinath
chethan.pandarinath at gmail.com
Fri Apr 23 17:41:13 PDT 2010
Hi everybody,
I've been working on installing PyCUDA on my MacBook (Snow Leopard). I
think I'm close to having it working, it's been quite a long road: getting
compatible versions of boost, setuptools, pytools... anyway, I think I'm
past all that.
I can now successfully run test_math.py and test_driver.py with no errors.
I am having trouble, however, with test_gpuarray.py
I'm attaching the output from running the test script, with the standard
error appended as well.
$ arch -i386 python test_gpuarray.py >test_gpuarray_output.txt
There are a couple types of errors that I can see here:
E AssertionError: (array(-4.2129004090721698e+36),
-1.2509687918788644e+303, <type 'numpy.float64'>, 'min')
test_gpuarray.py:328: AssertionError
E assert array(-6.0786212321272663e+144) ==
-2.6357594520767543e+301
test_gpuarray.py:357: AssertionError
E LaunchError: cuCtxPopCurrent failed: launch failed
/Library/Python/2.6/site-packages/pycuda/tools.py:504: LaunchError
E RuntimeError: make_default_context() wasn't able to create a
context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
To tell you the truth I don't know how to begin debugging this. If anyone
can point me in the right direction, I'd greatly appreciate it. Willing to
provide any info that would help...
I'm running this on a MacBook, Snow Leopard (10.6.3), with an NVIDIA GeForce
9400M. Using Python 2.6.1.
Thanks.
Chethan
--
Chethan Pandarinath
chethan.pandarinath at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20100423/fb4d3330/attachment-0001.htm>
-------------- next part --------------
=================================================== test session starts ===================================================
python: platform darwin -- Python 2.6.1 -- pytest-1.2.1
test object 1: test_gpuarray.py
test_gpuarray.py ...F..F....FFFFFFFFFFFFFFFF
======================================================== FAILURES =========================================================
________________________________________________ TestGPUArray.test_minmax _________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
ctx = make_default_context()
try:
assert isinstance(ctx.get_device().name(), str)
assert isinstance(ctx.get_device().compute_capability(), tuple)
assert isinstance(ctx.get_device().get_attributes(), dict)
> inner_f(*args, **kwargs)
/Library/Python/2.6/site-packages/pycuda/tools.py:502:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_gpuarray.TestGPUArray instance at 0x1bd44b8>
@mark_cuda_test
def test_minmax(self):
from pycuda.curandom import rand as curand
for what in ["min", "max"]:
for dtype in [numpy.float64, numpy.float32, numpy.int32]:
a_gpu = curand((200000,), dtype)
a = a_gpu.get()
op_a = getattr(numpy, what)(a)
op_a_gpu = getattr(gpuarray, what)(a_gpu).get()
> assert op_a_gpu == op_a, (op_a_gpu, op_a, dtype, what)
E AssertionError: (array(-4.2129004090721698e+36), -1.2509687918788644e+303, <type 'numpy.float64'>, 'min')
test_gpuarray.py:328: AssertionError
_____________________________________________ TestGPUArray.test_subset_minmax _____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
ctx = make_default_context()
try:
assert isinstance(ctx.get_device().name(), str)
assert isinstance(ctx.get_device().compute_capability(), tuple)
assert isinstance(ctx.get_device().get_attributes(), dict)
> inner_f(*args, **kwargs)
/Library/Python/2.6/site-packages/pycuda/tools.py:502:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_gpuarray.TestGPUArray instance at 0x1bf0af8>
@mark_cuda_test
def test_subset_minmax(self):
from pycuda.curandom import rand as curand
l_a = 200000
gran = 5
l_m = l_a - l_a // gran + 1
for dtype in [numpy.float64, numpy.float32, numpy.int32]:
a_gpu = curand((l_a,), dtype)
a = a_gpu.get()
meaningful_indices_gpu = gpuarray.zeros(l_m, dtype=numpy.int32)
meaningful_indices = meaningful_indices_gpu.get()
j = 0
for i in range(len(meaningful_indices)):
meaningful_indices[i] = j
j = j + 1
if j % gran == 0:
j = j + 1
meaningful_indices_gpu = gpuarray.to_gpu(meaningful_indices)
b = a[meaningful_indices]
min_a = numpy.min(b)
min_a_gpu = gpuarray.subset_min(meaningful_indices_gpu, a_gpu).get()
> assert min_a_gpu == min_a
E assert array(-6.0786212321272663e+144) == -2.6357594520767543e+301
test_gpuarray.py:357: AssertionError
_____________________________________________ TestGPUArray.test_complex_bits ______________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
ctx = make_default_context()
try:
assert isinstance(ctx.get_device().name(), str)
assert isinstance(ctx.get_device().compute_capability(), tuple)
assert isinstance(ctx.get_device().get_attributes(), dict)
inner_f(*args, **kwargs)
finally:
> ctx.pop()
E LaunchError: cuCtxPopCurrent failed: launch failed
/Library/Python/2.6/site-packages/pycuda/tools.py:504: LaunchError
----------------------------------------------------- Captured stderr -----------------------------------------------------
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuMemFree failed: launch failed
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuMemFree failed: launch failed
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuMemFree failed: launch failed
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuMemFree failed: invalid context
__________________________________________________ TestGPUArray.test_sum __________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
____________________________________________ TestGPUArray.test_nan_arithmetic _____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
________________________________________________ TestGPUArray.test_reverse ________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
________________________________________________ TestGPUArray.test_astype _________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
____________________________________________ TestGPUArray.test_multiply_array _____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
____________________________________________ TestGPUArray.test_addition_scalar ____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
_____________________________________________ TestGPUArray.test_divide_array ______________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
________________________________________________ TestGPUArray.test_arange _________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
______________________________________________ TestGPUArray.test_if_positive ______________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
_________________________________________________ TestGPUArray.test_slice _________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
___________________________________________ TestGPUArray.test_substract_scalar ____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
_______________________________________________ TestGPUArray.test_multiply ________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
____________________________________________ TestGPUArray.test_substract_array ____________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
_______________________________________________ TestGPUArray.test_take_put ________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
__________________________________________________ TestGPUArray.test_dot __________________________________________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than once
pycuda.driver.init()
> ctx = make_default_context()
/Library/Python/2.6/site-packages/pycuda/tools.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def make_default_context():
ndevices = cuda.Device.count()
if ndevices == 0:
errmsg = "No CUDA enabled device found. Please check your installation."
raise RuntimeError, errmsg
ndevices = cuda.Device.count()
if ndevices == 0:
raise RuntimeError("No CUDA enabled device found. "
"Please check your installation.")
# Is CUDA_DEVICE set?
import os
devn = os.environ.get("CUDA_DEVICE")
# Is $HOME/.cuda_device set ?
if devn is None:
try:
homedir = os.environ.get("HOME")
assert homedir is not None
devn = (open(os.path.join(homedir, ".cuda_device"))
.read().strip())
except:
pass
# If either CUDA_DEVICE or $HOME/.cuda_device is set, try to use it ;-)
if devn is not None:
try:
devn = int(devn)
except TypeError:
raise TypeError("CUDA device number (CUDA_DEVICE or ~/.cuda_device)"
" must be an integer")
dev = cuda.Device(devn)
return dev.make_context()
# Otherwise, try to use any available device
else:
selected_device = None
for devn in xrange(ndevices):
dev = cuda.Device(devn)
try:
return dev.make_context()
except cuda.Error:
pass
raise RuntimeError("make_default_context() wasn't able to create a context "
> "on any of the %d detected devices" % ndevices)
E RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices
/Library/Python/2.6/site-packages/pycuda/tools.py:216: RuntimeError
=========================================== 18 failed, 9 passed in 1.28 seconds ===========================================
STDERROR OUTPUT:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
LogicError: cuCtxPopCurrent failed: invalid context
Error in sys.exitfunc:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
pycuda._driver.LogicError: cuCtxPopCurrent failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
PyCUDA WARNING: a clean-up operation failed (dead context maybe?)
cuModuleUnload failed: invalid context
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------
Abort trap
More information about the PyCUDA
mailing list