8 Replies Latest reply on Sep 29, 2013 8:36 PM by cc_wang

    Fail to add Bolt::cl::transform to OpenMM

    cc_wang

      hi, all,

      Recently i was learning about OpenMM and want to Speed up it by Bolt, but i meet an runtime error. I compiled OpenMM on win7 with MSVS2012.

      what i done:

      1. copy the funtion 'transform' and the type 'Functor' define (lie in Bolt-1.0-GA-VS2012\examples\Transform\Transform.cpp);

      2. Add the code into OpenCLIntegrationUtilities.cpp file, this file is a source file of OpenMM and this file should be compiled into a dll file;

      3. Add 'transform(32);' into function OpenCLIntegrationUtilities::computeKineticEnergy(double timeShift);

       

      Now i can compile it successful, but when run the test case(TestOpenCLVerletIntegrator), I meet an error.

      If anyone can give some advises?

       

      >OpenMMOpenCL_d.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<cl::Device> > >::operator*() Line 73C++
      OpenMMOpenCL_d.dll!std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<class cl::Device> > >::operator*(void)C++
      OpenMMOpenCL_d.dll!std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<class cl::Device> > >::operator->(void)C++
      OpenMMOpenCL_d.dll!bolt::cl::control::getDefaultCommandQueue(void)C++
      OpenMMOpenCL_d.dll!bolt::cl::control::control(bool createGlobal) Line 287C++
      OpenMMOpenCL_d.dll!bolt::cl::control::getDefault() Line 248C++
      OpenMMOpenCL_d.dll!bolt::cl::transform<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > >,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > >,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > >,Functor>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > > first1, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > > last1, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > > first2, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float> > > result, Functor f, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & user_code) Line 54C++
      OpenMMOpenCL_d.dll!transform(int aSize) Line 1033C++
      OpenMMOpenCL_d.dll!OpenMM::OpenCLIntegrationUtilities::computeKineticEnergy(double timeShift) Line 1046C++
      OpenMMOpenCL_d.dll!OpenMM::OpenCLIntegrateVerletStepKernel::computeKineticEnergy(OpenMM::ContextImpl & context, const OpenMM::VerletIntegrator & integrator) Line 4258C++
      OpenMM_d.dll!OpenMM::VerletIntegrator::computeKineticEnergy() Line 68C++
      OpenMM_d.dll!OpenMM::ContextImpl::calcKineticEnergy() Line 227C++
      OpenMM_d.dll!OpenMM::Context::getState(int types, bool enforcePeriodicBox, int groups) Line 90C++
      TestOpenCLVerletIntegrator.exe!testSingleBond() Line 72C++
      TestOpenCLVerletIntegrator.exe!main(int argc, char * * argv) Line 209C++
      TestOpenCLVerletIntegrator.exe!__tmainCRTStartup() Line 536C
      TestOpenCLVerletIntegrator.exe!mainCRTStartup() Line 377C
      kernel32.dll!765b33aa()Unknown
      [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
      ntdll.dll!77629ef2()Unknown
      ntdll.dll!77629ec5()Unknown

       

      the attachments are OpenMM source code and the Bolt code, OpenCLIntegrationUtilities.cpp is the OpenMM source code file and i had add clBolt.Example.Transform code into it. this file lie in OpenMM5.1-Source\OpenMM5.1-Source\platforms\opencl\src.