I just rebuilt PyOpenCL from the latest code in the git repo.  This same code
works fine on my mac.

Here's my siteconf.py file, with GL set to True:
BOOST_INC_DIR = ['F:\\Program Files (x86)\\boost\\boost_1_39']
BOOST_LIB_DIR = ['F:\\Program Files (x86)\\boost\\boost_1_39\\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_39']
USE_SHIPPED_BOOST = False
CL_TRACE = False
CL_ENABLE_GL = True
CL_INC_DIR = ['C:\\Program Files (x86)\\ATI Stream\\include', 
   'C:\\Program Files (x86)\\ATI Stream\\include\\CL']
CL_LIB_DIR = ['C:\\Program Files (x86)\\ATI Stream\\lib\\x86']
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['/EHsc','/DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = ['/FORCE']


Here's the output of the build procedure:

C:\Users\Keith\Desktop\pyopencl\pyopencl>python setup.py install
running install
install_dir C:\Python26\Lib\site-packages\
running bdist_egg
running egg_info
writing requirements to pyopencl.egg-info\requires.txt
writing pyopencl.egg-info\PKG-INFO
writing top-level names to pyopencl.egg-info\top_level.txt
writing dependency_links to pyopencl.egg-info\dependency_links.txt
writing requirements to pyopencl.egg-info\requires.txt
writing pyopencl.egg-info\PKG-INFO
writing top-level names to pyopencl.egg-info\top_level.txt
writing dependency_links to pyopencl.egg-info\dependency_links.txt
reading manifest file 'pyopencl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyopencl.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\lib.win32-2.6
creating build\lib.win32-2.6\pyopencl
copying pyopencl\array.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\clmath.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\clrandom.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\elementwise.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\reduction.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\tools.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\version.py -> build\lib.win32-2.6\pyopencl
copying pyopencl\__init__.py -> build\lib.win32-2.6\pyopencl
running build_ext
building '_cl' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\src
creating build\temp.win32-2.6\Release\src\wrapper
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/wrap_cl.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_cl.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATURES
wrap_cl.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\wrap_cl.hpp(3150) : 
warning C4018: '>' : signed/unsigned mismatch
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/wrap_cl_part_1.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_cl_part_1.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATU
RES
wrap_cl_part_1.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\wrap_cl.hpp(3150) : 
warning C4018: '>' : signed/unsigned mismatch
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/wrap_cl_part_2.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_cl_part_2.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATU
RES
wrap_cl_part_2.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\wrap_cl.hpp(3150) : 
warning C4018: '>' : signed/unsigned mismatch
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/wrap_constants.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_constants.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATU
RES
wrap_constants.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\wrap_cl.hpp(3150) : 
warning C4018: '>' : signed/unsigned mismatch
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/wrap_mempool.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_mempool.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATURES
wrap_mempool.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\wrap_cl.hpp(3150) : 
warning C4018: '>' : signed/unsigned mismatch
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\bitlog.hpp(35) : warning
C4244: 'argument' : conversion from 'boost::uint32_t'
to 'boost::uint16_t', possible loss of data
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopencl -DPYG
PU_PYOPENCL=1 -DHAVE_GL=1 -Isrc/cpp "-IF:\Program Files (x86)\boost\boost_1_39"
"-IC:\Program Files (x86)\ATI Stream\include" "-IC:\
Program Files (x86)\ATI Stream\include\CL"
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include
-IC:\Python26\PC
 /Tpsrc/wrapper/bitlog.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/bitlog.obj /EHsc
/DBOOST_PYTHON_NO_PY_SIGNATURES
bitlog.cpp
c:\users\keith\desktop\pyopencl\pyopencl\src\wrapper\bitlog.hpp(35) : warning
C4244: 'argument' : conversion from 'boost::uint32_t'
to 'boost::uint16_t', possible loss of data
F:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO "/LIBPATH:F:\Program Files (x86)\boo
st\boost_1_39\lib" "/LIBPATH:C:\Program Files (x86)\ATI Stream\lib\x86"
/LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild boost
_python-vc90-mt-1_39.lib OpenCL.lib /EXPORT:init_cl
build\temp.win32-2.6\Release\src/wrapper/wrap_cl.obj build\temp.win32-2.6\Relea
se\src/wrapper/wrap_cl_part_1.obj
build\temp.win32-2.6\Release\src/wrapper/wrap_cl_part_2.obj
build\temp.win32-2.6\Release\src/wrappe
r/wrap_constants.obj build\temp.win32-2.6\Release\src/wrapper/wrap_mempool.obj
build\temp.win32-2.6\Release\src/wrapper/bitlog.obj /
OUT:build\lib.win32-2.6\pyopencl\_cl.pyd
/IMPLIB:build\temp.win32-2.6\Release\src/wrapper\_cl.lib
/MANIFESTFILE:build\temp.win32-2.6
\Release\src/wrapper\_cl.pyd.manifest /FORCE
   Creating library build\temp.win32-2.6\Release\src/wrapper\_cl.lib and object
build\temp.win32-2.6\Release\src/wrapper\_cl.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest
build\temp.win32-2.6\Release\src/wrapper\_cl.pyd.manifest
 -outputresource:build\lib.win32-2.6\pyopencl\_cl.pyd;2
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\pyopencl
copying build\lib.win32-2.6\pyopencl\array.py -> build\bdist.win32\egg\pyopencl
copying build\lib.win32-2.6\pyopencl\clmath.py -> build\bdist.win32\egg\pyopencl
copying build\lib.win32-2.6\pyopencl\clrandom.py -> build\bdist.win32\egg
\pyopencl
copying build\lib.win32-2.6\pyopencl\elementwise.py ->
build\bdist.win32\egg\pyopencl
copying build\lib.win32-2.6\pyopencl\reduction.py -> build\bdist.win32\egg
\pyopencl
copying build\lib.win32-2.6\pyopencl\tools.py -> build\bdist.win32\egg
\pyopencl
copying build\lib.win32-2.6\pyopencl\version.py -> build\bdist.win32\egg
\pyopencl
copying build\lib.win32-2.6\pyopencl\_cl.pyd -> build\bdist.win32\egg\pyopencl
copying build\lib.win32-2.6\pyopencl\__init__.py -> build\bdist.win32\egg
\pyopencl
byte-compiling build\bdist.win32\egg\pyopencl\array.py to array.pyc
byte-compiling build\bdist.win32\egg\pyopencl\clmath.py to clmath.pyc
byte-compiling build\bdist.win32\egg\pyopencl\clrandom.py to clrandom.pyc
byte-compiling build\bdist.win32\egg\pyopencl\elementwise.py to elementwise.pyc
byte-compiling build\bdist.win32\egg\pyopencl\reduction.py to reduction.pyc
byte-compiling build\bdist.win32\egg\pyopencl\tools.py to tools.pyc
byte-compiling build\bdist.win32\egg\pyopencl\version.py to version.pyc
byte-compiling build\bdist.win32\egg\pyopencl\__init__.py to __init__.pyc
creating stub loader for pyopencl\_cl.pyd
byte-compiling build\bdist.win32\egg\pyopencl\_cl.py to _cl.pyc
creating build\bdist.win32\egg\EGG-INFO
copying pyopencl.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying pyopencl.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying pyopencl.egg-info\dependency_links.txt -> build\bdist.win32\egg
\EGG-INFO
copying pyopencl.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying pyopencl.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
writing build\bdist.win32\egg\EGG-INFO\native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist\pyopencl-2011.1beta3-py2.6-win32.egg' and adding
'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing pyopencl-2011.1beta3-py2.6-win32.egg
creating c:\python26\lib\site-packages\pyopencl-2011.1beta3-py2.6-win32.egg
Extracting pyopencl-2011.1beta3-py2.6-win32.egg to c:\python26\lib
\site-packages
Adding pyopencl 2011.1beta3 to easy-install.pth file

Installed c:\python26\lib\site-packages\pyopencl-2011.1beta3-py2.6-win32.egg
Processing dependencies for pyopencl==2011.1beta3
Searching for decorator==3.3.0
Best match: decorator 3.3.0
Processing decorator-3.3.0-py2.6.egg
decorator 3.3.0 is already the active version in easy-install.pth

Using c:\python26\lib\site-packages\decorator-3.3.0-py2.6.egg
Searching for py==1.4.0
Best match: py 1.4.0
Processing py-1.4.0-py2.6.egg
py 1.4.0 is already the active version in easy-install.pth

Using c:\python26\lib\site-packages\py-1.4.0-py2.6.egg
Searching for pytools==11
Best match: pytools 11
Processing pytools-11-py2.6.egg
pytools 11 is already the active version in easy-install.pth
Installing logtool script to C:\Python26\Scripts
Installing runalyzer script to C:\Python26\Scripts
Installing runalyzer-gather script to C:\Python26\Scripts

Using c:\python26\lib\site-packages\pytools-11-py2.6.egg
Finished processing dependencies for pyopencl==2011.1beta3

And here's the failure when I try to run the gl shared context sample:

C:\Users\Keith\Desktop\pyopencl\pyopencl\examples>python gl_interop_demo.py
Traceback (most recent call last):
  File "gl_interop_demo.py", line 73, in <module>
    initialize()
  File "gl_interop_demo.py", line 34, in initialize
    + get_gl_sharing_context_properties())
pyopencl.LogicError: Context failed: invalid gl sharegroup reference number

-------

The ATI C samples that use shared context (the BoxFilterGL and the other one
with vertex buffer shared) work fine.  Clearly I am getting something wrong
with this tiny piece of Pyopencl.  Can anyone see what is going on with my
system?

--Keith Brafford


_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to