Installing cuda Gromacs/Openmm from source
Posted: Tue May 26, 2009 6:48 am
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