Installing cuda Gromacs/Openmm from source
- Dirk Colbry
- Posts: 7
- Joined: Fri Apr 24, 2009 1:36 pm
Installing cuda Gromacs/Openmm from source
I am trying to install Openmm and Gromacs from source on a linux 64 bit system. Unfortunately, I do not have root privileges on this system and therefore none of the libraries are in standard default locations.
So far I have managed to install the cuda 32 bit toolkit2.2 in /tmp/cuda/ and was able to install and link openmm (/opt/cus/openmm/OpenMMPreview3-Source/) to these libraries. These install seem fine but I do not know of the best way to test the install.
I am now trying to install Gromacs4.3pre_for_OpenMMZephyr0.2_Source.tar.gz and have run into many problems. Fortunately, though trial and error I have been able to figure out many of the problems myself by trying different cmake flags and environmental variables. Unfortunately, I am stuck and I have run out of ideas to try. Everything is building fine until I try to link mdrun_openmm. The following is the link command generated by cmake and the errors.
cd /opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32/src/kernel && /mnt/sys/thor-00/baerb/local/bin/cmake -E cmake_link_script CMakeFiles/mdrun_openmm.dir/link.txt --verbose=1
/usr/bin/linux32 /usr/bin/g++ -m32 -O3 -DNDEBUG -fPIC CMakeFiles/mdrun_openmm.dir/glaasje.c.o CMakeFiles/mdrun_openmm.dir/gctio.c.o CMakeFiles/mdrun_openmm.dir/ionize.c.o CMakeFiles/mdrun_openmm.dir/do_gct.c.o CMakeFiles/mdrun_openmm.dir/repl_ex.c.o CMakeFiles/mdrun_openmm.dir/xutils.c.o CMakeFiles/mdrun_openmm.dir/md.c.o CMakeFiles/mdrun_openmm.dir/mdrun.c.o CMakeFiles/mdrun_openmm.dir/genalg.c.o CMakeFiles/mdrun_openmm.dir/vmdreporter.cpp.o CMakeFiles/mdrun_openmm.dir/imd.cpp.o CMakeFiles/mdrun_openmm.dir/vmdsock.c.o CMakeFiles/mdrun_openmm.dir/md_openmm.cpp.o -o ../../bin/mdrun_openmm -rdynamic libgmxpreprocess.a ../mdlib/libmd.a ../gmxlib/libgmx.a /opt/cus/fftw32/lib/libfftw3f.a /opt/cus/openmm/OpenMMPreview3-Source/lib/plugins/libOpenMMCuda_static.a /opt/cus/openmm/OpenMMPreview3-Source/lib/libOpenMM_static.a ../gmxlib/gmx_lapack/liblapack.a ../gmxlib/gmx_blas/libblas.a ../gmxlib/nonbonded/libnonbonded.a ../gmxlib/nonbonded/nb_kernel/libnb_kernel.a ../gmxlib/nonbonded/nb_kernel_ia32_sse/libnb_kernel_ia32_sse.a ../gmxlib/nonbonded/nb_kernel_ia32_3dnow/libnb_kernel_ia32_3dnow.a -lm
CMakeFiles/mdrun_openmm.dir/md_openmm.cpp.o: In function `openmm_init':
md_openmm.cpp:(.text+0x1bc5): undefined reference to `OpenMM::System::System(int, int)'
md_openmm.cpp:(.text+0x1c41): undefined reference to `OpenMM::HarmonicBondForce::HarmonicBondForce(int)'
md_openmm.cpp:(.text+0x1cf9): undefined reference to `OpenMM::HarmonicAngleForce::HarmonicAngleForce(int)'
md_openmm.cpp:(.text+0x1dd7): undefined reference to `OpenMM::PeriodicTorsionForce::PeriodicTorsionForce(int)'
md_openmm.cpp:(.text+0x1ed9): undefined reference to `OpenMM::RBTorsionForce::RBTorsionForce(int)'
md_openmm.cpp:(.text+0x2015): undefined reference to `OpenMM::NonbondedForce::NonbondedForce(int, int)'
md_openmm.cpp:(.text+0x21e3): undefined reference to `OpenMM::NonbondedForce::setNonbonded14Parameters(int, int, int, double, double, double)'
md_openmm.cpp:(.text+0x2719): undefined reference to `OpenMM::GBSAOBCForce::GBSAOBCForce(int)'
/opt/cus/openmm/OpenMMPreview3-Source/lib/libOpenMM_static.a(Platform.cpp.o): In function `OpenMM::Platform::loadPluginLibrary(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Platform.cpp:(.text+0x1810): undefined reference to `dlopen'
Platform.cpp:(.text+0x1826): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[2]: *** [bin/mdrun_openmm] Error 1
make[2]: Leaving directory `/opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32'
make[1]: *** [src/kernel/CMakeFiles/mdrun_openmm.dir/all] Error 2
make[1]: Leaving directory `/opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32'
make: *** [all] Error 2
From the errors it looks like the system is having trouble linking in the libOpenMMCuda library. However, This library is in the LD_LIBRARY_PATH and the full path is included in the link command. I have tried linking to both the static and dynamic libraries. I have also installed pre-compiled openmm libraries but nothing seems to work.
Has anyone encountered the same (or similar) problem?
Thank you,
Dirk
So far I have managed to install the cuda 32 bit toolkit2.2 in /tmp/cuda/ and was able to install and link openmm (/opt/cus/openmm/OpenMMPreview3-Source/) to these libraries. These install seem fine but I do not know of the best way to test the install.
I am now trying to install Gromacs4.3pre_for_OpenMMZephyr0.2_Source.tar.gz and have run into many problems. Fortunately, though trial and error I have been able to figure out many of the problems myself by trying different cmake flags and environmental variables. Unfortunately, I am stuck and I have run out of ideas to try. Everything is building fine until I try to link mdrun_openmm. The following is the link command generated by cmake and the errors.
cd /opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32/src/kernel && /mnt/sys/thor-00/baerb/local/bin/cmake -E cmake_link_script CMakeFiles/mdrun_openmm.dir/link.txt --verbose=1
/usr/bin/linux32 /usr/bin/g++ -m32 -O3 -DNDEBUG -fPIC CMakeFiles/mdrun_openmm.dir/glaasje.c.o CMakeFiles/mdrun_openmm.dir/gctio.c.o CMakeFiles/mdrun_openmm.dir/ionize.c.o CMakeFiles/mdrun_openmm.dir/do_gct.c.o CMakeFiles/mdrun_openmm.dir/repl_ex.c.o CMakeFiles/mdrun_openmm.dir/xutils.c.o CMakeFiles/mdrun_openmm.dir/md.c.o CMakeFiles/mdrun_openmm.dir/mdrun.c.o CMakeFiles/mdrun_openmm.dir/genalg.c.o CMakeFiles/mdrun_openmm.dir/vmdreporter.cpp.o CMakeFiles/mdrun_openmm.dir/imd.cpp.o CMakeFiles/mdrun_openmm.dir/vmdsock.c.o CMakeFiles/mdrun_openmm.dir/md_openmm.cpp.o -o ../../bin/mdrun_openmm -rdynamic libgmxpreprocess.a ../mdlib/libmd.a ../gmxlib/libgmx.a /opt/cus/fftw32/lib/libfftw3f.a /opt/cus/openmm/OpenMMPreview3-Source/lib/plugins/libOpenMMCuda_static.a /opt/cus/openmm/OpenMMPreview3-Source/lib/libOpenMM_static.a ../gmxlib/gmx_lapack/liblapack.a ../gmxlib/gmx_blas/libblas.a ../gmxlib/nonbonded/libnonbonded.a ../gmxlib/nonbonded/nb_kernel/libnb_kernel.a ../gmxlib/nonbonded/nb_kernel_ia32_sse/libnb_kernel_ia32_sse.a ../gmxlib/nonbonded/nb_kernel_ia32_3dnow/libnb_kernel_ia32_3dnow.a -lm
CMakeFiles/mdrun_openmm.dir/md_openmm.cpp.o: In function `openmm_init':
md_openmm.cpp:(.text+0x1bc5): undefined reference to `OpenMM::System::System(int, int)'
md_openmm.cpp:(.text+0x1c41): undefined reference to `OpenMM::HarmonicBondForce::HarmonicBondForce(int)'
md_openmm.cpp:(.text+0x1cf9): undefined reference to `OpenMM::HarmonicAngleForce::HarmonicAngleForce(int)'
md_openmm.cpp:(.text+0x1dd7): undefined reference to `OpenMM::PeriodicTorsionForce::PeriodicTorsionForce(int)'
md_openmm.cpp:(.text+0x1ed9): undefined reference to `OpenMM::RBTorsionForce::RBTorsionForce(int)'
md_openmm.cpp:(.text+0x2015): undefined reference to `OpenMM::NonbondedForce::NonbondedForce(int, int)'
md_openmm.cpp:(.text+0x21e3): undefined reference to `OpenMM::NonbondedForce::setNonbonded14Parameters(int, int, int, double, double, double)'
md_openmm.cpp:(.text+0x2719): undefined reference to `OpenMM::GBSAOBCForce::GBSAOBCForce(int)'
/opt/cus/openmm/OpenMMPreview3-Source/lib/libOpenMM_static.a(Platform.cpp.o): In function `OpenMM::Platform::loadPluginLibrary(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Platform.cpp:(.text+0x1810): undefined reference to `dlopen'
Platform.cpp:(.text+0x1826): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[2]: *** [bin/mdrun_openmm] Error 1
make[2]: Leaving directory `/opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32'
make[1]: *** [src/kernel/CMakeFiles/mdrun_openmm.dir/all] Error 2
make[1]: Leaving directory `/opt/cus/gromacs/gromacs-4.0.3-cuda/src/build32'
make: *** [all] Error 2
From the errors it looks like the system is having trouble linking in the libOpenMMCuda library. However, This library is in the LD_LIBRARY_PATH and the full path is included in the link command. I have tried linking to both the static and dynamic libraries. I have also installed pre-compiled openmm libraries but nothing seems to work.
Has anyone encountered the same (or similar) problem?
Thank you,
Dirk
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Installing cuda Gromacs/Openmm from source
Hi Dirk,
That's an old version of Gromacs, written to use an old version of OpenMM. That's why it's not able to find some of the symbols it's looking for. You should use the version of Gromacs from the OpenMM download page (based on 4.0.5).
Also, note that all of our precompiled binaries are for 32 bit Linux, and we haven't tested OpenMM on 64 bit Linux. Let me know how you get on. If you're able to get it working, perhaps we can put together a set of instructions telling people exactly what they need to do to use it on 64 bit Linux.
Peter
That's an old version of Gromacs, written to use an old version of OpenMM. That's why it's not able to find some of the symbols it's looking for. You should use the version of Gromacs from the OpenMM download page (based on 4.0.5).
Also, note that all of our precompiled binaries are for 32 bit Linux, and we haven't tested OpenMM on 64 bit Linux. Let me know how you get on. If you're able to get it working, perhaps we can put together a set of instructions telling people exactly what they need to do to use it on 64 bit Linux.
Peter
- Jiri Cerny
- Posts: 5
- Joined: Mon Apr 20, 2009 12:02 am
RE: Installing cuda Gromacs/Openmm from source
Hi Peter,
I managed to compile 64 bit versions of openmm(prev3)/cuda(2.2) as well as gromacs 4.0.5. Few not so difficult tricks were necessary, like recompilation of cudpp and cutil with -fPIC and using these libs instead of the 32 bit versions distributed with openmm.
Mdrun_openmm "works", I mean it writes "Successfully loaded plugin libOpenMMCuda_d.so" and it finishes (but too quickly, with nodetime = 0) not crashing or so, on the other hand it doesn't calculate anything, all the values are zeros.
Here comes my question, instead of playing with the probably not so correct input, do you have by chance anything I can test the run on?
Thanks,
JC
I managed to compile 64 bit versions of openmm(prev3)/cuda(2.2) as well as gromacs 4.0.5. Few not so difficult tricks were necessary, like recompilation of cudpp and cutil with -fPIC and using these libs instead of the 32 bit versions distributed with openmm.
Mdrun_openmm "works", I mean it writes "Successfully loaded plugin libOpenMMCuda_d.so" and it finishes (but too quickly, with nodetime = 0) not crashing or so, on the other hand it doesn't calculate anything, all the values are zeros.
Here comes my question, instead of playing with the probably not so correct input, do you have by chance anything I can test the run on?
Thanks,
JC
- vinod jani
- Posts: 14
- Joined: Sun Dec 07, 2008 9:16 pm
RE: Installing cuda Gromacs/Openmm from source
hi jiri,
i am facing a problem
"libcudpp.a when searching for -lcudpp not found"
when i am trying to install openmm, so can please mention the steps you followed while installation
Thanks
regards
Jani vinod
i am facing a problem
"libcudpp.a when searching for -lcudpp not found"
when i am trying to install openmm, so can please mention the steps you followed while installation
Thanks
regards
Jani vinod
- Jiri Cerny
- Posts: 5
- Joined: Mon Apr 20, 2009 12:02 am
RE: Installing cuda Gromacs/Openmm from source
Hi,
first you have to download cudpp from http://gpgpu.org/developer/cudpp, then modify linux_build/common.mk to include -fPIC for all the compilers (nvcc,cxx,cc,link; for nvcc it is recommended to add also -Xcompiler), then compile it. You will get libcudpp64.a - copy this to src/platforms/cuda/cudpp/linux/libcudpp.a. You need CUDA 2.2 for this and maybe it is a good idea to recompile cutil in the similar way (it is already part of CUDA SDK).
good luck,
JC
first you have to download cudpp from http://gpgpu.org/developer/cudpp, then modify linux_build/common.mk to include -fPIC for all the compilers (nvcc,cxx,cc,link; for nvcc it is recommended to add also -Xcompiler), then compile it. You will get libcudpp64.a - copy this to src/platforms/cuda/cudpp/linux/libcudpp.a. You need CUDA 2.2 for this and maybe it is a good idea to recompile cutil in the similar way (it is already part of CUDA SDK).
good luck,
JC
- Jack Shultz
- Posts: 77
- Joined: Thu May 28, 2009 6:49 pm
RE: Installing cuda Gromacs/Openmm from source
I am interested in building this for Windows. I was going to try using Cygwin to emulate a POSIX environment as I have built gromacs using cygwin in the past. Am I doomed to failure as there are no windows binaries currently available?
- Jack Shultz
- Posts: 77
- Joined: Thu May 28, 2009 6:49 pm
RE: Installing cuda Gromacs/Openmm from source
Now I see that Zephyr0.5 has a binary for mdrun_openmm! I think I'm all set. But I would like some better information on how to compile in windows.
RE: Installing cuda Gromacs/Openmm from source
Note that the Zephyr0.5 binary for mdrun_openmm runs on OpenMM Preview Release 2 (not preview release 3). There will be a Windows binary for Gromacs-OpenMM Preview Release 3 coming soon.
Joy
Joy
- vinod jani
- Posts: 14
- Joined: Sun Dec 07, 2008 9:16 pm
RE: Installing cuda Gromacs/Openmm from source
Hello Jiri,
Thanks a lot , i was able to compile and run the gromacs
Thanks a lot , i was able to compile and run the gromacs
- Huijun Zhu
- Posts: 5
- Joined: Wed Feb 18, 2009 1:25 pm
RE: Installing cuda Gromacs/Openmm from source
Dear Peter,
I also have the same problem of compiling Gromacs-4.0.5 with OpenMM on our 64-bit Linux machine. Currently the Gromacs-4.0.5 source is downloaded, and the revised files (from GromacsOpenmmPR3-Linux32/src) are copied to the corresponding directories. The following messages are at the end of compiling:
md.o: In function `do_md':
md.c:(.text+0x198e): undefined reference to `openmm_init'
md.c:(.text+0x2129): undefined reference to `openmm_take_one_step'
md.c:(.text+0x2238): undefined reference to `openmm_copy_state'
md.c:(.text+0x2519): undefined reference to `openmm_cleanup'
collect2: ld returned 1 exit status
make[3]: *** [mdrun] Error 1
make[3]: Leaving directory `/root/gromacs/gromacs-4.0.5/src/kernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/gromacs/gromacs-4.0.5/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/gromacs/gromacs-4.0.5/src'
make: *** [all-recursive] Error 1
Any ideas about why those openmm functions are not found?
Thanks!
Huijun
I also have the same problem of compiling Gromacs-4.0.5 with OpenMM on our 64-bit Linux machine. Currently the Gromacs-4.0.5 source is downloaded, and the revised files (from GromacsOpenmmPR3-Linux32/src) are copied to the corresponding directories. The following messages are at the end of compiling:
md.o: In function `do_md':
md.c:(.text+0x198e): undefined reference to `openmm_init'
md.c:(.text+0x2129): undefined reference to `openmm_take_one_step'
md.c:(.text+0x2238): undefined reference to `openmm_copy_state'
md.c:(.text+0x2519): undefined reference to `openmm_cleanup'
collect2: ld returned 1 exit status
make[3]: *** [mdrun] Error 1
make[3]: Leaving directory `/root/gromacs/gromacs-4.0.5/src/kernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/gromacs/gromacs-4.0.5/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/gromacs/gromacs-4.0.5/src'
make: *** [all-recursive] Error 1
Any ideas about why those openmm functions are not found?
Thanks!
Huijun