Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol with openmm anaconda #15

Open
hainm opened this issue Oct 3, 2015 · 12 comments
Open

undefined symbol with openmm anaconda #15

hainm opened this issue Oct 3, 2015 · 12 comments

Comments

@hainm
Copy link

hainm commented Oct 3, 2015

Hi,
I am not sure if my question here is in right place or not, but I install via 'omnia' channel, so ...

install

conda install -c omnia openmm --force

run

python -c 'from simtk import openmm

get error

ImportError: /home/haichit/anaconda3/lib/python3.4/site-packages/simtk/openmm/_openmm.cpython-34m.so: undefined symbol: _ZZN4swig11traits_infoISt3mapIiiSt4lessIiESaISt4pairIKiiEEEE9type_infoEvE4info

any idea why this happens? thanks

@rmcgibbo
Copy link
Contributor

rmcgibbo commented Oct 3, 2015

my guess is that you have an older version of openmm in your LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH).

@hainm
Copy link
Author

hainm commented Oct 3, 2015

@rmcgibbo any idea how to check that?

I tried to locate and delete all simtk folder and reinstall, still got same error.

locate _openmm.cpython-34m.so
`/u1/haichit/anaconda3/lib/python3.4/site-packages/simtk/openmm/_openmm.cpython-34m.so
/u1/haichit/anaconda3/pkgs/openmm-6.3-py34_0/lib/python3.4/site-packages/simtk/openmm/_openmm.cpython-34m.so

@jchodera
Copy link
Member

jchodera commented Oct 3, 2015

Have you tried this in a clean miniconda install? I find I have to flush mine out every once in a while.

Before you try that, you should try uninstalling the openmm and openmm-dev packages and clearing out your caches:

conda remove --yes openmm openmm-dev
conda clean -ptls --yes
conda install --yes openmm-dev

@hainm
Copy link
Author

hainm commented Oct 3, 2015

Have you tried this in a clean miniconda install? I find I have to flush mine out every once in a while.

openmm works fine in one of my machine.

Before you try that, you should try uninstalling the openmm and openmm-dev packages and clearing out your caches:

I copied and paste your commands but got same error. Probably I messed up somewhere, may be because I tried to install gcc and libgcc by conda.

@hainm
Copy link
Author

hainm commented Oct 3, 2015

conda clean -ptls --yes

this one seems dangerous. It destroyed my ipython.

@rmcgibbo
Copy link
Contributor

rmcgibbo commented Oct 3, 2015

$ echo $LD_LIBRARY_PATH

@hainm
Copy link
Author

hainm commented Oct 3, 2015

$ echo $LD_LIBRARY_PATH

sorry, I mean, what should I look for in $LD_LIBRARY_PATH?

@jchodera
Copy link
Member

jchodera commented Oct 3, 2015

Conda clean only clears caches. There is no way it should have an impact on installed packages.

That said, conda still seems buggy. There can be times where valid conda commands leave the packaged manager in an undefined state.

@rmcgibbo
Copy link
Contributor

rmcgibbo commented Oct 3, 2015

The cause of the undefined symbol import error you posted is that the linker is loading up a different version of libOpenMM.so than the one that the python wrappers were build with. This can be caused, for example, if you installed openmm 6.2 from source, and then conda-install openmm 6.3. Or something similar. So you should be looking for another version of openmm that's ahead in the linker path.

@hainm
Copy link
Author

hainm commented Oct 3, 2015

I tried to locate

$ locate libOpenMM.so
/u1/haichit/anaconda3/lib/libOpenMM.so

Not sure where else.

Here is all the "OpenMM" files in my path

In [2]: pt.tools.find_lib('OpenMM')
Out[2]:
['/home/haichit/anaconda3//lib/libOpenMMAmoeba.so',
 '/home/haichit/anaconda3//lib/libOpenMMRPMD.so',
 '/home/haichit/anaconda3//lib/libOpenMMDrude.so',
 '/home/haichit/anaconda3//lib/libOpenMM.so']

@rmcgibbo
Copy link
Contributor

rmcgibbo commented Oct 3, 2015

You might have more luck with ldd or strace.

@hainm
Copy link
Author

hainm commented Oct 3, 2015

no luck. I tried to create new envs, got the same error. this is how ldd show

$ ldd /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/_openmm.cpython-34m.so
        linux-vdso.so.1 =>  (0x00007fffe47f5000)
        libOpenMM.so => /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/../../../../libOpenMM.so (0x00002ab758b45000)
        libOpenMMAmoeba.so => /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/../../../../libOpenMMAmoeba.so (0x00002ab75901a000)
        libOpenMMRPMD.so => /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/../../../../libOpenMMRPMD.so (0x00002ab75928c000)
        libOpenMMDrude.so => /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/../../../../libOpenMMDrude.so (0x00002ab75949b000)
        libpython3.4m.so.1.0 => /home/haichit/anaconda3/envs/openmm/lib/python3.4/site-
packages/simtk/openmm/../../../../libpython3.4m.so.1.0 (0x00002ab7596ad000)
        libstdc++.so.6 => /home/haichit/anaconda3//lib/libstdc++.so.6 (0x00002ab759b58000)
        libm.so.6 => /lib64/libm.so.6 (0x00002ab759e84000)
        libgcc_s.so.1 => /home/haichit/anaconda3//lib/libgcc_s.so.1 (0x00002ab75a107000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ab75a31d000)
        libc.so.6 => /lib64/libc.so.6 (0x00002ab75a539000)
        librt.so.1 => /lib64/librt.so.1 (0x00002ab75a891000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002ab75aa9a000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00002ab75ac9f000)
        /lib64/ld-linux-x86-64.so.2 (0x00000036a1200000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants