OS X 10.6 and OpenCL

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Alex Tek
Posts: 3
Joined: Mon Jul 09, 2012 11:33 am

OS X 10.6 and OpenCL

Post by Alex Tek » Fri Feb 07, 2014 3:25 pm

Hi everyone,

I have a Macbook Pro running OS X 10.6.8with a GT 330M.

First, I have a compilation problem :
[ 53%] Building CXX object platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/__/src/OpenCLArray.cpp.o
In file included from /Users/alex/Development/OpenMM5.2-Source/platforms/opencl/./include/OpenCLContext.h:39,
from /Users/alex/Development/OpenMM5.2-Source/platforms/opencl/./include/OpenCLArray.h:30,
from /Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/OpenCLArray.cpp:27:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, void*, cl_int*)’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:3760: error: ‘__CREATE_IMAGE2D_ERR’ was not declared in this scope
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image2DGL::Image2DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:3842: error: ‘__CREATE_GL_TEXTURE_2D_ERR’ was not declared in this scope
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, size_t, size_t, void*, cl_int*)’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:4028: error: ‘__CREATE_IMAGE3D_ERR’ was not declared in this scope
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image3DGL::Image3DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:4108: error: ‘__CREATE_GL_TEXTURE_3D_ERR’ was not declared in this scope
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueReadBufferRect(const cl::Buffer&, cl_bool, const cl::size_t<3>&, const cl::size_t<3>&, const cl::size_t<3>&, size_t, size_t, size_t, size_t, void*, const std::vector<cl::Event, std::allocator<cl::Event> >*, cl::Event*) const’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:5303: error: ‘::clEnqueueReadBufferRect’ has not been declared
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueWriteBufferRect(const cl::Buffer&, cl_bool, const cl::size_t<3>&, const cl::size_t<3>&, const cl::size_t<3>&, size_t, size_t, size_t, size_t, void*, const std::vector<cl::Event, std::allocator<cl::Event> >*, cl::Event*) const’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:5342: error: ‘::clEnqueueWriteBufferRect’ has not been declared
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueCopyBufferRect(const cl::Buffer&, const cl::Buffer&, const cl::size_t<3>&, const cl::size_t<3>&, const cl::size_t<3>&, size_t, size_t, size_t, size_t, const std::vector<cl::Event, std::allocator<cl::Event> >*, cl::Event*) const’:
/Users/alex/Development/OpenMM5.2-Source/platforms/opencl/src/cl.hpp:5380: error: ‘::clEnqueueCopyBufferRect’ has not been declared
make[2]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/__/src/OpenCLArray.cpp.o] Error 1
make[1]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/all] Error 2
make: *** [all] Error 2

Seond, when trying to use the pre-compiled binaries I get this:
./HelloArgon
OpenCL internal error: [CL_INVALID_BUFFER_SIZE] : OpenCL Error : clCreateBuffer failed: No device in the context supports the requested allocation size (-1430580672 bytes)!
EXCEPTION: Error creating array sigmaEpsilon: clCreateBuffer (-61)

The reference implementation seems to work. I can't test the CUDA version as the drivers for 10.6 are outdated.

So, is it working at all on Snow Leopard ?

Thanks

POST REPLY