Hello Everyone,
I have been very happy using pyopencl built with gcc & I am trying to get pyopencl up + running on another platform using:
  icc
  NVIDIA Cuda 4.0 SDK
  python 2.6.4
  numpy from github


The first issue was resolved by adding "-no-gcc" to CFLAGS, so the CUDA SDK would avoid some gcc specific logic.

After this I ran into issues with missing files in bpl-subset:

For example, it appears the "edg" directory (which is needed for icc & other edg based compilers) is missing at following path:

pyopencl-2011.1.2/bpl-subset/bpl_subset/boost/preprocessor/list/detail/

I looked at the bpl-subset repo and found the script that extracts the desired subset of boost. Running this on a fresh copy of the newest boost (1.48.0), I found bcp to be the culprit - for some reason it omits this directory.

I replaced bpl-subset/bpl_subset/boost, with boost_1_48_0/boost, I made it further,
however I hit some compiler errors:

The first error, icc is confused by using PyArray_BYTES macro as an lvalue:

src/wrapper/wrap_cl.hpp(2107): error: expression must be a modifiable lvalue
      PyArray_BYTES(result.get()) = reinterpret_cast<char *>(mapped);
      ^

I was able to get it to compile with the following code:

    PyArrayObject *py_ptr = (PyArrayObject*)result.get();
    py_ptr->data = reinterpret_cast<char *>(mapped);

The second error occurs in logic for creating a context with gl sharing:

src/wrapper/wrap_cl.hpp(741): error: expected a statement
          else
          ^

I think the compiler takes a bad path though the current #defines.
I stripped the code down to:

       if (prop == CL_CONTEXT_PLATFORM)
        {
          py::extract<const platform &> value(prop_tuple[1]);
          props.push_back(
              reinterpret_cast<cl_context_properties>(value().data()));
        }
        else
throw error("Context", CL_INVALID_VALUE, "invalid context property");

And I was able to compile, but of course this is not a good general solution.

At this point, the module compiles, but when I try to use pyopencl I get a runtime error due to a missing symbol:
    import pyopencl._cl as _cl
ImportError: zzz/site-packages/lib/python2.6/site-packages/pyopencl-2011.1beta3-py2.6-linux-x86_64.egg/pyopencl/_cl.so: undefined symbol: _ZTIN5boost6python17error_already_setE (typeinfo for boost::python::error_already_set)

Could this be a consequence of using 1_48_0, instead of the modified version of 1_47_0 in the bpl_subset repo? Thanks for any help you can provide. I am eager to work though these issues, willing to test & contribute back any progress .

-Cyrus Harrison




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

Reply via email to