Hi,
I having a problem building openmm on a linux machine from source. I was able to do it on the mac (after having some troubles early on), and then was able to make changes to the source code to fit my application. Now I want to use this changed source code on a linux machine because it has a better gpu. This did not go well, as I got lots of errors when configuring such as (note I did not change any cmake files):
CMake Error at platforms/reference/tests/CMakeLists.txt:13 (ADD_EXECUTABLE):
add_executable called with incorrect number of arguments
CMake Error at platforms/reference/tests/CMakeLists.txt:15 (ADD_TEST):
add_test called with incorrect number of arguments
CMake Error at platforms/reference/tests/CMakeLists.txt:13 (ADD_EXECUTABLE):
add_executable called with incorrect number of arguments
I then tried to build openmm from pure source code (i.e. I did not change any of it). This failed as well, but with different errors. I was able to configure, but then when compiling I would get stuff like this:
Scanning dependencies of target OpenMM
[ 0%] Building CXX object CMakeFiles/OpenMM.dir/src/examples/Empty.cpp.o
[ 0%] Building CXX object CMakeFiles/OpenMM.dir/src/examples/HelloArgon.cpp.o
[ 0%] Building CXX object CMakeFiles/OpenMM.dir/src/examples/HelloWaterBox.cpp.o
[ 1%] Building CXX object CMakeFiles/OpenMM.dir/src/examples/HelloEthane.cpp.o
[ 1%] Building CXX object CMakeFiles/OpenMM.dir/src/examples/HelloSodiumChloride.cpp.o
[ 1%] Building CXX object CMakeFiles/OpenMM.dir/src/tests/TestParser.cpp.o
[ 1%] Building CXX object CMakeFiles/OpenMM.dir/src/tests/TestFindExclusions.cpp.o
[ 1%] Building CXX object CMakeFiles/OpenMM.dir/openmmapi/src/CustomExternalForceImpl.cpp.o
[ 2%] Building CXX object CMakeFiles/OpenMM.dir/openmmapi/src/CustomBondForce.cpp.o
[ 2%] Building CXX object CMakeFiles/OpenMM.dir/openmmapi/src/._CustomAngleForceImpl.cpp.o
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:1: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\5’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\26’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\7’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:5: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\2’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:7: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:17: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\2’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:27: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:35: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘\2’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:43: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:47: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: stray ‘@’ in program
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:61: warning: null character(s) ignored
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:83: warning: no newline at end of file
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1: error: ‘Mac’ does not name a type
Any ideas on how to fix this? I checked the versions of the compiler and cmake and that all seems up to date.
Here are some specs:
Linux 2.6.18-92.1.10.el5 #1 SMP Wed Jul 23 03:56:11 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Thanks,
Jack
building openmm on linux from src
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: building openmm on linux from src
What version of CMake are you using? I'd guess it's a fairly old one. Try upgrading to the latest version.
Peter
Peter
- Jack Wieting
- Posts: 7
- Joined: Wed Jul 07, 2010 11:05 am
RE: building openmm on linux from src
cmake 2.8.2 which should be good enough since the suggested version is 2.6 or higher.
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: building openmm on linux from src
Could you describe exactly how you're trying to build it? The message
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:1: warning: null character(s) ignored
is very strange: there is no such file as ._CustomAngleForceImpl.cpp in the source distribution! Do you have any idea where that came from? Providing a step by step description of exactly what you're doing might illuminate it.
Peter
/home/wieting/OpenMM2.0-Source/openmmapi/src/._CustomAngleForceImpl.cpp:1:1: warning: null character(s) ignored
is very strange: there is no such file as ._CustomAngleForceImpl.cpp in the source distribution! Do you have any idea where that came from? Providing a step by step description of exactly what you're doing might illuminate it.
Peter
- Jack Wieting
- Posts: 7
- Joined: Wed Jul 07, 2010 11:05 am
RE: building openmm on linux from src
Hey Peter,
Thanks for taking the time to help me. I think I figured out what is wrong although it is very strange.
I think that "hidden" characters may have caused these issues because if I delete a line that is causing issues and then retype it that issue goes away-as if I deleted something that was causing the issue. I noticed this for the first time when I was editing a python script that I scp'd to my laptap when I was out of town last week.
Does this make any sense? I really think this is whats going on-because it does cause the code to work. Maybe it has something to do with converting directories to a .tar or is caused by the operating system. I would be interested in anything you have to say about this.
Thanks,
Jack
Thanks for taking the time to help me. I think I figured out what is wrong although it is very strange.
I think that "hidden" characters may have caused these issues because if I delete a line that is causing issues and then retype it that issue goes away-as if I deleted something that was causing the issue. I noticed this for the first time when I was editing a python script that I scp'd to my laptap when I was out of town last week.
Does this make any sense? I really think this is whats going on-because it does cause the code to work. Maybe it has something to do with converting directories to a .tar or is caused by the operating system. I would be interested in anything you have to say about this.
Thanks,
Jack