OpenMM4.1.1-Source OpenCL build error

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Benjamin Trendelkamp-Schroer
Posts: 12
Joined: Fri Feb 24, 2012 11:49 am

OpenMM4.1.1-Source OpenCL build error

Post by Benjamin Trendelkamp-Schroer » Fri Jan 18, 2013 6:12 am

Hello,

I am trying to build OpenMM4.1.1 from source using OpenCL.

The "ccmake" procedure is successful.

I get the following error upon "make":

Code: Select all

[ 45%] Building CXX object platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/__/src/OpenCLKernels.cpp.o
In file included from /home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/OpenCLContext.h:39:0,
                 from /home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/OpenCLArray.h:30,
                 from /home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/OpenCLKernels.h:31,
                 from /home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/OpenCLKernels.cpp:27:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In function ‘cl_int cl::UnloadCompiler()’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:1556:12: error: ‘::clUnloadCompiler’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-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*)’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:2200:19: error: ‘::clCreateImage2D’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image2DGL::Image2DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:2245:19: error: ‘::clCreateFromGLTexture2D’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-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*)’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:2299:19: error: ‘::clCreateImage3D’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In constructor ‘cl::Image3DGL::Image3DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:2345:19: error: ‘::clCreateFromGLTexture3D’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueMarker(cl::Event*) const’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:3389:13: error: ‘::clEnqueueMarker’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueWaitForEvents(const std::vector<cl::Event>&) const’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:3396:13: error: ‘::clEnqueueWaitForEvents’ has not been declared
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueBarrier() const’:
/home/trendelkamp/src/OpenMM4.1.1-Source/platforms/opencl/src/cl.hpp:3511:13: error: ‘::clEnqueueBarrier’ has not been declared
make[2]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/__/src/OpenCLKernels.cpp.o] Fehler 1
make[1]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL.dir/all] Fehler 2
make: *** [all] Fehler 2

I would be glad for any hints on how I can resolve this.

Thanks,

Ben

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: OpenMM4.1.1-Source OpenCL build error

Post by Peter Eastman » Fri Jan 18, 2013 11:54 am

Hi Ben,

It looks like it isn't finding the OpenCL header files. What is OPENCL_INCLUDE_DIR set to in CMake?

Peter

User avatar
Benjamin Trendelkamp-Schroer
Posts: 12
Joined: Fri Feb 24, 2012 11:49 am

Re: OpenMM4.1.1-Source OpenCL build error

Post by Benjamin Trendelkamp-Schroer » Mon Jan 21, 2013 12:30 am

Hi Peter,

ccmake sets

Code: Select all

 OPEN_CL_INCLUDE_DIR=/usr/include 
I checked my include folder but the opencl.h file is residing in /usr/include/CL.

Setting

Code: Select all

 OPEN_CLINCLUDE_DIR=/usr/include/CL 
did not help, though.

The contents of /usr/include/CL are

Code: Select all

 cl_d3d10.h  cl_dx9_media_sharing.h  cl_gl_ext.h  cl.h    cl_platform.h
cl_d3d11.h  cl_ext.h                cl_gl.h      cl.hpp  opencl.h
Thanks,

Ben

POST REPLY