Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error] pyopencl #596

Open
CJ-Wright opened this issue Jun 11, 2017 · 2 comments
Open

[error] pyopencl #596

CJ-Wright opened this issue Jun 11, 2017 · 2 comments

Comments

@CJ-Wright
Copy link
Contributor

I got the following error using the conda-forge pyopencl (it is the same version as the pip one)

WARNING:xsdimage:lxml library is probably not part of your python installation: disabling xsdimage format
Traceback (most recent call last):
  File "/home/christopher/mc/envs/dp_dev/bin/pyFAI-calib", line 4, in <module>
    __import__('pkg_resources').run_script('pyFAI==0.13.1', 'pyFAI-calib')
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyFAI-0.13.1-py3.5-linux-x86_64.egg-info/scripts/pyFAI-calib", line 45, in <module>
    import pyFAI
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyFAI/__init__.py", line 49, in <module>
    from .azimuthalIntegrator import AzimuthalIntegrator
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyFAI/azimuthalIntegrator.py", line 119, in <module>
    from .opencl import ocl
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyFAI/opencl.py", line 196, in <module>
    class OpenCL(object):
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyFAI/opencl.py", line 208, in OpenCL
    for idx, platform in enumerate(pyopencl.get_platforms()):
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyopencl/cffi_cl.py", line 660, in get_platforms
    _handle_error(_lib.get_platforms(platforms.ptr, platforms.size))
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/site-packages/pyopencl/cffi_cl.py", line 633, in _handle_error
    raise e
pyopencl.cffi_cl.LogicError: clGetPlatformIDs failed: <unknown error -1001>

Thoughts?

@kif
Copy link
Member

kif commented Jun 12, 2017 via email

@picca
Copy link
Collaborator

picca commented Oct 11, 2017

Hello, It would be nice to unactive opencl when this error is reported durint the import of pyFAI. to avoid this :)

In [1]: import pyopencl

In [2]: pyopencl.get_platforms()
---------------------------------------------------------------------------
LogicError                                Traceback (most recent call last)
<ipython-input-2-2a778713b183> in <module>()
----> 1 pyopencl.get_platforms()

/usr/lib/python2.7/dist-packages/pyopencl/cffi_cl.pyc in get_platforms()
    662 def get_platforms():
    663     platforms = _CArray(_ffi.new('clobj_t**'))
--> 664     _handle_error(_lib.get_platforms(platforms.ptr, platforms.size))
    665     return [Platform._create(platforms.ptr[0][i])
    666             for i in range(platforms.size[0])]

/usr/lib/python2.7/dist-packages/pyopencl/cffi_cl.pyc in _handle_error(error)
    624     _lib.free_pointer(error.msg)
    625     _lib.free_pointer(error)
--> 626     raise e
    627 
    628 # }}}

LogicError: clGetPlatformIDs failed: <unknown error -1001>

In [3]: import pyFAI
---------------------------------------------------------------------------
LogicError                                Traceback (most recent call last)
<ipython-input-3-801308462145> in <module>()
----> 1 import pyFAI

/usr/lib/python2.7/dist-packages/pyFAI/__init__.py in <module>()
     55 
     56 from .detectors import Detector
---> 57 from .azimuthalIntegrator import AzimuthalIntegrator
     58 from .decorators import depreclog
     59 load = AzimuthalIntegrator.sload

/usr/lib/python2.7/dist-packages/pyFAI/azimuthalIntegrator.py in <module>()
    110 
    111 
--> 112 from .opencl import ocl
    113 if ocl:
    114     try:

/usr/lib/python2.7/dist-packages/pyFAI/opencl/__init__.py in <module>()
     48 
     49 from .utils import get_opencl_code, concatenate_cl_kernel
---> 50 from .common import *

/usr/lib/python2.7/dist-packages/pyFAI/opencl/common.py in <module>()
    268 
    269 
--> 270 class OpenCL(object):
    271     """
    272     Simple class that wraps the structure ocl_tools_extended.h

/usr/lib/python2.7/dist-packages/pyFAI/opencl/common.py in OpenCL()
    282     if pyopencl:
    283         platform = device = pypl = devtype = extensions = pydev = None
--> 284         for idx, platform in enumerate(pyopencl.get_platforms()):
    285             pypl = Platform(platform.name, platform.vendor, platform.version, platform.extensions, idx)
    286             for idd, device in enumerate(platform.get_devices()):

/usr/lib/python2.7/dist-packages/pyopencl/cffi_cl.pyc in get_platforms()
    662 def get_platforms():
    663     platforms = _CArray(_ffi.new('clobj_t**'))
--> 664     _handle_error(_lib.get_platforms(platforms.ptr, platforms.size))
    665     return [Platform._create(platforms.ptr[0][i])
    666             for i in range(platforms.size[0])]

/usr/lib/python2.7/dist-packages/pyopencl/cffi_cl.pyc in _handle_error(error)
    624     _lib.free_pointer(error.msg)
    625     _lib.free_pointer(error)
--> 626     raise e
    627 
    628 # }}}

LogicError: clGetPlatformIDs failed: <unknown error -1001>

reported by one of my users ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants