openmm2.0 and cuda 3.1 64 bits in Mac
Posted: Tue Jul 20, 2010 11:46 pm
Hi there,
Compiling openmm2.0 from source worked fine in 32 bits. Now that Cuda 3.1 is full 64 bits in Mac I gave a try in 64 bits, by putting in ccmake "CMAKE_OSX_ARCHITECTURES x86_64"
...
[ 96%] Building CXX object plugins/freeEnergy/platforms/cuda/sharedTarget/CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o
cd /Users/alan/Downloads/build_openmm/plugins/freeEnergy/platforms/cuda/sharedTarget && /usr/bin/c++ -DOpenMMFreeEnergyCuda_EXPORTS -DOPENMM_LIBRARY_NAME=OpenMM -DOPENMM_MAJOR_VERSION=1 -DOPENMM_MINOR_VERSION=0 -DOPENMM_BUILD_VERSION=0 -DOPENMM_SVN_REVISION=\"exported\" -DOPENMM_COPYRIGHT_YEARS=\"2008\" -DOPENMM_AUTHORS=\"Peter.Eastman\" -DOPENMM_FREE_ENERGY_LIBRARY_NAME=OpenMMFreeEnergy -DOPENMM_FREE_ENERGY_MAJOR_VERSION=1 -DOPENMM_FREE_ENERGY_MINOR_VERSION=0 -DOPENMM_FREE_ENERGY_BUILD_VERSION=0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -O3 -DNDEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/src/SimTKReference -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/reference/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/openmmapi/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/validate/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/sfmt/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/lepton/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/quern/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/jama/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/olla/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/openmmapi/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/cuda/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/src/kernels -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/cuda/src -I/usr/local/cuda/include -DOPENMMCUDAFREEENERGY_BUILDING_SHARED_LIBRARY -o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o -c /Users/alan/Downloads/build_openmm/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp
Linking CXX shared library ../../../../../libOpenMMFreeEnergyCuda.dylib
cd /Users/alan/Downloads/build_openmm/plugins/freeEnergy/platforms/cuda/sharedTarget && /sw/bin/cmake -E cmake_link_script CMakeFiles/OpenMMFreeEnergyCuda.dir/link.txt --verbose=1
/usr/bin/c++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -O3 -DNDEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -dynamiclib -headerpad_max_install_names -o ../../../../../libOpenMMFreeEnergyCuda.dylib -install_name /Users/alan/Downloads/build_openmm/libOpenMMFreeEnergyCuda.dylib CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/CudaFreeEnergyKernelFactory.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/CudaFreeEnergyKernels.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuGBVISoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuLJ14Softcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuNonbondedSoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuObcGbsaSoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateCDLJObcGbsaSoftcoreForces1.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateGBVISoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateGBVISoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateLocalSoftcoreForces.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateNonbondedSoftcore.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o -L/usr/local/cuda/lib/libcuda.dylib -L/usr/local/cuda/lib/libcudart.dylib /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcudart.dylib ../../../../../libOpenMM.dylib ../../../../../libOpenMMCuda.dylib ../../../../../libOpenMMFreeEnergy.dylib /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcudart.dylib /usr/local/cuda/lib/libcufft.dylib ../../../../../libOpenMM.dylib /usr/lib/libdl.dylib
ld: warning: path '/usr/local/cuda/lib/libcuda.dylib' following -L not a directory
ld: warning: path '/usr/local/cuda/lib/libcudart.dylib' following -L not a directory
ld: warning: duplicate dylib /usr/local/cuda/lib/libcuda.dylib
ld: warning: path '/usr/local/cuda/lib/libcuda.dylib' following -L not a directory
ld: warning: path '/usr/local/cuda/lib/libcudart.dylib' following -L not a directory
ld: warning: duplicate dylib /usr/local/cuda/lib/libcuda.dylib
Undefined symbols:
"_fwrite$UNIX2003", referenced from:
kPrintGBVISoftcore(_gpuContext*, GpuGBVISoftcore*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)in kCalculateGBVISoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/+m/+meU9wCwHYKwh16Rr5-GsE+++TM/-Tmp-//cc8jPJB3.out (No such file or directory)
make[2]: *** [libOpenMMFreeEnergyCuda.dylib] Error 1
make[1]: *** [plugins/freeEnergy/platforms/cuda/sharedTarget/CMakeFiles/OpenMMFreeEnergyCuda.dir/all] Error 2
make: *** [all] Error 2
The files generated up here are universal i386 and x86_64, e.g.,
TestCudaAndersenThermostat: Mach-O universal binary with 2 architectures
TestCudaAndersenThermostat (for architecture i386): Mach-O executable i386
TestCudaAndersenThermostat (for architecture x86_64): Mach-O 64-bit executable x86_64
Any idea? Thanks,
Alan
Compiling openmm2.0 from source worked fine in 32 bits. Now that Cuda 3.1 is full 64 bits in Mac I gave a try in 64 bits, by putting in ccmake "CMAKE_OSX_ARCHITECTURES x86_64"
...
[ 96%] Building CXX object plugins/freeEnergy/platforms/cuda/sharedTarget/CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o
cd /Users/alan/Downloads/build_openmm/plugins/freeEnergy/platforms/cuda/sharedTarget && /usr/bin/c++ -DOpenMMFreeEnergyCuda_EXPORTS -DOPENMM_LIBRARY_NAME=OpenMM -DOPENMM_MAJOR_VERSION=1 -DOPENMM_MINOR_VERSION=0 -DOPENMM_BUILD_VERSION=0 -DOPENMM_SVN_REVISION=\"exported\" -DOPENMM_COPYRIGHT_YEARS=\"2008\" -DOPENMM_AUTHORS=\"Peter.Eastman\" -DOPENMM_FREE_ENERGY_LIBRARY_NAME=OpenMMFreeEnergy -DOPENMM_FREE_ENERGY_MAJOR_VERSION=1 -DOPENMM_FREE_ENERGY_MINOR_VERSION=0 -DOPENMM_FREE_ENERGY_BUILD_VERSION=0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -O3 -DNDEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/src/SimTKReference -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/reference/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/openmmapi/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/validate/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/reference/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/sfmt/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/lepton/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/quern/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/libraries/jama/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/olla/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/openmmapi/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/cuda/./include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/include -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/src -I/Users/alan/Downloads/OpenMM2.0-Source/src/platforms/cuda/src/kernels -I/Users/alan/Downloads/OpenMM2.0-Source/src/plugins/freeEnergy/platforms/cuda/src -I/usr/local/cuda/include -DOPENMMCUDAFREEENERGY_BUILDING_SHARED_LIBRARY -o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o -c /Users/alan/Downloads/build_openmm/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp
Linking CXX shared library ../../../../../libOpenMMFreeEnergyCuda.dylib
cd /Users/alan/Downloads/build_openmm/plugins/freeEnergy/platforms/cuda/sharedTarget && /sw/bin/cmake -E cmake_link_script CMakeFiles/OpenMMFreeEnergyCuda.dir/link.txt --verbose=1
/usr/bin/c++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -O3 -DNDEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -dynamiclib -headerpad_max_install_names -o ../../../../../libOpenMMFreeEnergyCuda.dylib -install_name /Users/alan/Downloads/build_openmm/libOpenMMFreeEnergyCuda.dylib CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/CudaFreeEnergyKernelFactory.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/CudaFreeEnergyKernels.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuGBVISoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuLJ14Softcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuNonbondedSoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/src/kernels/GpuObcGbsaSoftcore.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateCDLJObcGbsaSoftcoreForces1.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateGBVISoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateGBVISoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateLocalSoftcoreForces.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateNonbondedSoftcore.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o CMakeFiles/OpenMMFreeEnergyCuda.dir/__/__/__/__/__/src/cuda/kCalculateObcGbsaSoftcoreForces2.cu_OpenMMFreeEnergyCuda_generated.cpp.o -L/usr/local/cuda/lib/libcuda.dylib -L/usr/local/cuda/lib/libcudart.dylib /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcudart.dylib ../../../../../libOpenMM.dylib ../../../../../libOpenMMCuda.dylib ../../../../../libOpenMMFreeEnergy.dylib /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcudart.dylib /usr/local/cuda/lib/libcufft.dylib ../../../../../libOpenMM.dylib /usr/lib/libdl.dylib
ld: warning: path '/usr/local/cuda/lib/libcuda.dylib' following -L not a directory
ld: warning: path '/usr/local/cuda/lib/libcudart.dylib' following -L not a directory
ld: warning: duplicate dylib /usr/local/cuda/lib/libcuda.dylib
ld: warning: path '/usr/local/cuda/lib/libcuda.dylib' following -L not a directory
ld: warning: path '/usr/local/cuda/lib/libcudart.dylib' following -L not a directory
ld: warning: duplicate dylib /usr/local/cuda/lib/libcuda.dylib
Undefined symbols:
"_fwrite$UNIX2003", referenced from:
kPrintGBVISoftcore(_gpuContext*, GpuGBVISoftcore*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)in kCalculateGBVISoftcoreBornSum.cu_OpenMMFreeEnergyCuda_generated.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/+m/+meU9wCwHYKwh16Rr5-GsE+++TM/-Tmp-//cc8jPJB3.out (No such file or directory)
make[2]: *** [libOpenMMFreeEnergyCuda.dylib] Error 1
make[1]: *** [plugins/freeEnergy/platforms/cuda/sharedTarget/CMakeFiles/OpenMMFreeEnergyCuda.dir/all] Error 2
make: *** [all] Error 2
The files generated up here are universal i386 and x86_64, e.g.,
TestCudaAndersenThermostat: Mach-O universal binary with 2 architectures
TestCudaAndersenThermostat (for architecture i386): Mach-O executable i386
TestCudaAndersenThermostat (for architecture x86_64): Mach-O 64-bit executable x86_64
Any idea? Thanks,
Alan