openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
55 stars 23 forks source link

Error while compiling openmm-plumed #33

Closed fahed4in closed 4 years ago

fahed4in commented 4 years ago

Hi Team, I am new to this type of installations. I did followed the instructions to compile and got an error while compilation on Mac (High Seirra). Please see below the error for more details:

_Scanning dependencies of target TestReferencePlumedForce [ 57%] Building CXX object platforms/reference/tests/CMakeFiles/TestReferencePlumedForce.dir/TestReferencePlumedForce.cpp.o /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:83:5: error: expected variable name or 'this' in lambda capture list ASSERT_EQUAL_VEC(Vec3(), state.getForces()[1], 1e-5); ^ /usr/local/openmm/include/openmm/internal/AssertionUtilities.h:57:174: note: expanded from macro 'ASSERT_EQUAL_VEC' ...found, tol) {double norm = std::sqrt((expected).dot(expected)); double scale = norm > 1.0 ? norm : 1.0; if ((std::abs(((expected)[0])-((found)[0]))/scale > (... ^ /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:83:5: error: expected variable name or 'this' in lambda capture list /usr/local/openmm/include/openmm/internal/AssertionUtilities.h:57:234: note: expanded from macro 'ASSERT_EQUAL_VEC' ...double scale = norm > 1.0 ? norm : 1.0; if ((std::abs(((expected)[0])-((found)[0]))/scale > (tol)) || (std::abs(((expected)[1])-((found)[1]))/scale > (tol)) ... ^ /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:83:5: error: expected variable name or 'this' in lambda capture list /usr/local/openmm/include/openmm/internal/AssertionUtilities.h:57:294: note: expanded from macro 'ASSERT_EQUAL_VEC' ...: 1.0; if ((std::abs(((expected)[0])-((found)[0]))/scale > (tol)) || (std::abs(((expected)[1])-((found)[1]))/scale > (tol)) || (std::abs(((expected)[2])-((found)[2... ^ /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:256:2: error: expected '}' } ^ /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:83:5: note: to match this '{' ASSERT_EQUAL_VEC(Vec3(), state.getForces()[1], 1e-5); ^ /usr/local/openmm/include/openmm/internal/AssertionUtilities.h:57:48: note: expanded from macro 'ASSERT_EQUAL_VEC'

define ASSERT_EQUAL_VEC(expected, found, tol) {double norm = std::sqrt((expected).dot(expected)); double scale = norm > 1.0 ? norm : 1.0; if ((std::abs(((expe...

                                           ^

/Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:256:2: error: expected '}' } ^ /Users/nyuad/openmm-plumed/platforms/reference/tests/TestReferencePlumedForce.cpp:56:18: note: to match this '{' void testForce() { ^ 5 errors generated. make[2]: [platforms/reference/tests/CMakeFiles/TestReferencePlumedForce.dir/TestReferencePlumedForce.cpp.o] Error 1 make[1]: [platforms/reference/tests/CMakeFiles/TestReferencePlumedForce.dir/all] Error 2 make: *** [all] Error 2_

Below the cmake output : CMAKE_BUILD_TYPE
CMAKE_EXECUTABLE_FORMAT MACHO
CMAKE_INSTALL_PREFIX /usr/local/openmm
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
CUDA_HOST_COMPILER /Library/Developer/CommandLineTools/usr/bin/clang
CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND
OPENCL_INCLUDE_DIR /System/Library/Frameworks/OpenCL.framework/Headers
OPENCL_LIBRARY /System/Library/Frameworks/OpenCL.framework
OPENMM_DIR /usr/local/openmm
PLUMED_BUILD_CUDA_LIB OFF
PLUMED_BUILD_OPENCL_LIB ON
PLUMED_BUILD_PYTHON_WRAPPERS ON
PLUMED_INCLUDE_DIR /usr/local/include/plumed
PLUMED_LIBRARY_DIR /usr/local/lib
PYTHON_EXECUTABLE /Users/nyuad/miniconda3/bin/python
SWIG_EXECUTABLE /usr/local/bin/swig

Can you please advise how to fix this issue? many thanks in advance.

Thanks, Fahed

peastman commented 4 years ago

Strange, I don't know what caused that to start failing. I just merged a fix for it.

fahed4in commented 4 years ago

Thanks lot, it worked now. Thanks & Regards,Mohammed Fahed

On Saturday, June 20, 2020, 01:44:11 AM GMT+4, peastman <notifications@github.com> wrote:  

Strange, I don't know what caused that to start failing. I just merged a fix for it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.