Page 1 of 1

cannot find -lOpenM

Posted: Thu Mar 18, 2010 8:22 pm
by kylehong
Dear all,
I want to compiles openmm with source code,so I do the follows.(I can compile all the exampls download from this website perfectly,but my system with nan outputs if I use the pre-compied openmm)

(1)I remove the document which install openmm with pre-compiled files.But I don'remove mdrun-openmm in gromacs/bin,and params.agb in gromacs/share/gromacs/top.

(2)I compile the source code as the User Manual saids(The configure>genertate>buid>test>install process is ok).But the I don't reset the environment variable ,I think when I install the pre-com
openmm I have add them to the .bash_profile permently.

when I "cd /usr/local/openmm/examples" and "make"

it gives the errors:

g++ -g -I/usr/local/openmm/include HelloArgon.cpp -L/usr/local/openmm/lib -lOpenMM -o HelloArgon
/usr/bin/ld: cannot find -lOpenMM
collect2: ld returned 1 exit status
make: *** [HelloArgon] Error 1

so what's the problem really is? Any help will be appreciate.

Kyle



RE: cannot find -lOpenM

Posted: Wed Mar 24, 2010 2:27 pm
by peastman
It's not clear to me from your description exactly what you've done. Is the OpenMM library actually in /usr/local/openmm/lib? Also make sure that everything is compiled in a consistent way (32 vs 64 bits, release vs debug, etc.), since otherwise it won't be able to link.

Peter

RE: cannot find -lOpenM

Posted: Thu Mar 25, 2010 5:35 am
by kylehong
There are some files in the /usr/local/openmm/lib

and I don't know how to make sure that everything is compiled in a consistent way. My system is 64bit and I install the 64bit CUDA,how to check I compile openMM with release or debug? When I was in the cmake interface I just press "c" and "g" ,because I don't understand what the options mean.(except the options describe in the user manual)

[kylehong@chemsoft lib]$ pwd
/usr/local/openmm/lib
[kylehong@chemsoft lib]$ ls
libOpenMM_d.so libOpenMMFreeEnergy_static_d.a plugins
libOpenMMFreeEnergy_d.so libOpenMM_static_d.a

RE: cannot find -lOpenM

Posted: Thu Mar 25, 2010 5:50 am
by rkoga
I am also confused about the generation of libOpenMM_d.so in the similar system. When I run mdrun-openmm, there is a message like "./mdrun-openmm: error while loading shared libraries: libOpenMM.so: cannot open shared object file: No such file or director".

I compiled double-presion gromacs "mdrun_d" first, and double-presion openmm was generated.
I guess currently mdrun-openmm binary is seemed to support of single-precision only.

Maybe rename of libOpenMM_d.so -> libOpenMM.so is okay. Please tell me if someone knows about the situation of the support.

RE: cannot find -lOpenM

Posted: Thu Mar 25, 2010 10:41 am
by peastman
The _d is stands for debug, not double precision. In the CMake UI, you'll see an option called CMAKE_BUILD_TYPE. Change it from Debug to Release, and then it will build release mode libraries.

Peter