The "Microsoft Visual C++ Compiler for Python" is essentially the Visual Studio 2008 compiler. PyOpenCL >=2015.2 uses the C++11 standard, which this compiler does not support.

The options to build PyOpenCL for Python 2.7 on Windows are to 1) downgrade to PyOpenCL 2015.1 or 2) use mingwpy compilers <https://anaconda.org/carlkl/mingwpy>. Unfortunately the 64 bit build of PyOpenCL 2015.2.x is not stable ATM.

According to [1] Visual Studio 2015 should be able to build PyOpenCL for Python 3.5, but that will require more changes, e.g. on the variadic macros.

[1] <https://github.com/pyopencl/pyopencl/commit/d19d94cfb09803059fbd6665283e10617d9e4229#commitcomment-14903890>

Christoph


On 12/10/2015 8:47 AM, Andreas Kloeckner wrote:
I've added an #include to perhaps help fix this in 5fcc15c. Let me know
if that makes things better.

Andreas


Prashant Saxena <[email protected]> writes:

Hi,
pyopencl-master(Downloaded from github)Win7 x64Microsoft Visual C++ Compiler 
for PythonPython 2.7.2Nvidia Cuda 7.5

Commands:python configure.pysiteconf.py:CL_TRACE = False
CL_ENABLE_GL = True
CL_INC_DIR = ["C:\\Program Files\\NVIDIA GPU Computing 
Toolkit\\CUDA\\v7.5\\include"]
CL_LIB_DIR = ["C:\\Program Files\\NVIDIA GPU Computing 
Toolkit\\CUDA\\v7.5\\lib\\x64"]
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['-std=c++0x']
LDFLAGS = []python.exe setup.py build_ext --compiler=msvc
Errors:generating cffi module 
'build\\temp.win-amd64-2.7\\Release\\pyopencl._cffi.cpp'
building 'pyopencl._cffi' extension
C:\Users\john\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\
VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopenc
l -DPYGPU_PYOPENCL=1 -DHAVE_GL=1 "-IC:\Program Files\NVIDIA GPU Computing Toolki
t\CUDA\v7.5\include" -Isrc/c_wrapper/ -IC:\Python27\include -IC:\Python27\PC /Tp
build\temp.win-amd64-2.7\Release\pyopencl._cffi.cpp /Fobuild\temp.win-amd64-2.7\
Release\build\temp.win-amd64-2.7\Release\pyopencl._cffi.obj -std=c++0x
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
pyopencl._cffi.cpp
C:\Users\john\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\
VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYGPU_PACKAGE=pyopenc
l -DPYGPU_PYOPENCL=1 -DHAVE_GL=1 "-IC:\Program Files\NVIDIA GPU Computing Toolki
t\CUDA\v7.5\include" -Isrc/c_wrapper/ -IC:\Python27\include -IC:\Python27\PC /Tp
src/c_wrapper/wrap_cl.cpp /Fobuild\temp.win-amd64-2.7\Release\src/c_wrapper/wrap
_cl.obj -std=c++0x
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
wrap_cl.cpp
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(53) : error C2061: syntax error
: identifier 'uint32_t'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(59) : error C2065: 'add' : undec
lared identifier
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(59) : error C2143: syntax error
: missing ')' before 'const'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(59) : error C2059: syntax error
: ')'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(64) : error C2061: syntax error
: identifier 'uint32_t'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(66) : error C2061: syntax error
: identifier 'uint32_t'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(70) : error C2061: syntax error
: identifier 'uint32_t'
d:\pyopencl-master\src\c_wrapper\wrap_cl_core.h(101) : error C2061: syntax error
  : identifier 'uint32_t'
It would be great if we'll be able to build pyopencl using "Microsoft Visual C++ 
Compiler for Python".
CheersPrashant
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl


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



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

Reply via email to