Re: OS X Mavericks?
Posted: Thu Feb 13, 2014 7:13 am
Dear All,
Have now verified on a new, clean MacBook Pro (15" Retina display Quad core Intel I7) with NVIDIA GT750M GPU that OpenMM5.2 and OpenMM6.0 do not work with CUDA on platforms Mavericks (OSX 10.9) running the latest Xcode (5.02) and CUDA ToolKit/Drivers from cuda-mac-5.5.28_10.9_64.pkg. While the Cuda examples all run and find the GPU card, OpenMM5.2 will install, however, the python interface appears to be hosed (trying to run testInstallation.py gives an error:
20% python testInstallation.py
Failed to import OpenMM packages: dlopen(/Library/Python/2.7/site-packages/simtk/openmm/_openmm.so, 2): no suitable image found. Did find:
/Library/Python/2.7/site-packages/simtk/openmm/_openmm.so: mach-o, but wrong architecture
Make sure OpenMM is installed and the library path is set correctly.).
I expect this is a clang/gcc/g++ incompatibility. The test example HelloArgon.cpp, compiled using just make w/o arguments, doesn't compile and gives the error:
31% make
g++ -g -I/Users/brookscl/OpenMM/openmm_5.2/include HelloArgon.cpp -L/Users/brookscl/OpenMM/openmm_5.2/lib -lOpenMM -o HelloArgon
Undefined symbols for architecture x86_64:
"OpenMM::Context::setPositions(std::__1::vector<OpenMM::Vec3, std::__1::allocator<OpenMM::Vec3> > const&)", referenced from:
simulateArgon() in HelloArgon-4Cv30G.o
"OpenMM::Platform::loadPluginsFromDirectory(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
simulateArgon() in HelloArgon-4Cv30G.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [HelloArgon] Error 1
The code HelloArgonInC.c compiles and runs, but runs on the OpenCL platform:
37% HelloArgonInC
REMARK Using OpenMM platform OpenCL
For OpenMM6.0 the situation is somewhat different, the existing pre-compiled libraries seem more compatible, but the CUDA platform is still not recognized.
Running the python test scrips yields:
46% python testInstallation.py
There are 3 Platforms available:
1 Reference - Successfully computed forces
2 CPU - Successfully computed forces
3 OpenCL - Successfully computed forces
Median difference in forces between platforms:
Reference vs. CPU: 3.41782e-06
Reference vs. OpenCL: 0.00462904
CPU vs. OpenCL: 0.0046304
The other examples all compile in c++ and c, but run on the OpenCL platform.
Thus, for some reason. the CUDA platform is not recognized. I note that we have also seen errors in the computation of PME energies on the OpenCL platform with OpenMM5.2, and thus I am hesitant to continue to do code development on OpenCL since I am unsure of the results. This will be the subject of another post once we have more data.
Any help/insights into how to get the CUDA platform to be recognized on the MacBook running Mavericks with either OpenMM5.2 or OpenMM6.0 would be appreciated.
Charles Brooks
Have now verified on a new, clean MacBook Pro (15" Retina display Quad core Intel I7) with NVIDIA GT750M GPU that OpenMM5.2 and OpenMM6.0 do not work with CUDA on platforms Mavericks (OSX 10.9) running the latest Xcode (5.02) and CUDA ToolKit/Drivers from cuda-mac-5.5.28_10.9_64.pkg. While the Cuda examples all run and find the GPU card, OpenMM5.2 will install, however, the python interface appears to be hosed (trying to run testInstallation.py gives an error:
20% python testInstallation.py
Failed to import OpenMM packages: dlopen(/Library/Python/2.7/site-packages/simtk/openmm/_openmm.so, 2): no suitable image found. Did find:
/Library/Python/2.7/site-packages/simtk/openmm/_openmm.so: mach-o, but wrong architecture
Make sure OpenMM is installed and the library path is set correctly.).
I expect this is a clang/gcc/g++ incompatibility. The test example HelloArgon.cpp, compiled using just make w/o arguments, doesn't compile and gives the error:
31% make
g++ -g -I/Users/brookscl/OpenMM/openmm_5.2/include HelloArgon.cpp -L/Users/brookscl/OpenMM/openmm_5.2/lib -lOpenMM -o HelloArgon
Undefined symbols for architecture x86_64:
"OpenMM::Context::setPositions(std::__1::vector<OpenMM::Vec3, std::__1::allocator<OpenMM::Vec3> > const&)", referenced from:
simulateArgon() in HelloArgon-4Cv30G.o
"OpenMM::Platform::loadPluginsFromDirectory(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
simulateArgon() in HelloArgon-4Cv30G.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [HelloArgon] Error 1
The code HelloArgonInC.c compiles and runs, but runs on the OpenCL platform:
37% HelloArgonInC
REMARK Using OpenMM platform OpenCL
For OpenMM6.0 the situation is somewhat different, the existing pre-compiled libraries seem more compatible, but the CUDA platform is still not recognized.
Running the python test scrips yields:
46% python testInstallation.py
There are 3 Platforms available:
1 Reference - Successfully computed forces
2 CPU - Successfully computed forces
3 OpenCL - Successfully computed forces
Median difference in forces between platforms:
Reference vs. CPU: 3.41782e-06
Reference vs. OpenCL: 0.00462904
CPU vs. OpenCL: 0.0046304
The other examples all compile in c++ and c, but run on the OpenCL platform.
Thus, for some reason. the CUDA platform is not recognized. I note that we have also seen errors in the computation of PME energies on the OpenCL platform with OpenMM5.2, and thus I am hesitant to continue to do code development on OpenCL since I am unsure of the results. This will be the subject of another post once we have more data.
Any help/insights into how to get the CUDA platform to be recognized on the MacBook running Mavericks with either OpenMM5.2 or OpenMM6.0 would be appreciated.
Charles Brooks