cannot find -lOpenM

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Kyle Hong
Posts: 6
Joined: Wed Mar 10, 2010 9:30 pm

cannot find -lOpenM

Post by Kyle Hong » Thu Mar 18, 2010 8:22 pm

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



User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

RE: cannot find -lOpenM

Post by Peter Eastman » Wed Mar 24, 2010 2:27 pm

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

User avatar
Kyle Hong
Posts: 6
Joined: Wed Mar 10, 2010 9:30 pm

RE: cannot find -lOpenM

Post by Kyle Hong » Thu Mar 25, 2010 5:35 am

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

User avatar
Ryota Koga
Posts: 1
Joined: Fri Sep 11, 2009 9:05 pm

RE: cannot find -lOpenM

Post by Ryota Koga » Thu Mar 25, 2010 5:50 am

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.

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

RE: cannot find -lOpenM

Post by Peter Eastman » Thu Mar 25, 2010 10:41 am

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

POST REPLY