installing as root with user anaconda cython

224 views
Skip to first unread message

Ben Harland

unread,
Nov 29, 2021, 9:07:09 AM11/29/21
to PLUMED users
I am having a similar problem to:

My cython is from user-installed anaconda and isn't found by 'sudo make install'.  I tried 'sudo pip install cython' but this makes me nervous, and in any case I now have:

     plumed.cpp:34:10: fatal error: Python.h: No such file or directory

I see in the install instructions that 'make install' is not strictly required, but when I try to patch to gromacs, I get:

     plumed: error while loading shared libraries: libplumedKernel.so: cannot open shared object file: No such file or directory

What is the "best practise" for getting a working plumed/gromacs?

Many thanks! 

Giovanni Bussi

unread,
Nov 29, 2021, 10:33:13 AM11/29/21
to plumed...@googlegroups.com
Hi,

first, for a working plumed + gromacs you do not need python, so just configure with --disable-python if this is creating problems on your installation.

Second, if libplumedKernel.so is not found it might be because you installed it in a non standard path. E.g., if you install it in
/home/opt/lib/libplumedKernel.so
you should add path /home/opt/lib to LD_LIBRARY_PATH

Let us know if this fixes your problem

Giovanni


--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/ae588523-7060-4539-a541-55af018263b3n%40googlegroups.com.

Ben Harland

unread,
Nov 29, 2021, 11:12:56 AM11/29/21
to PLUMED users
Thanks!  Ok, I've done
     ./configure --prefix=/usr/local —disable-python

I'm still getting `libplumedKernel.so: cannot open shared object file` when I run `plumed patch -p` in the gromacs directory.  Is there a way to tell plumed where to find it's shared library files?

Ben Harland

unread,
Nov 29, 2021, 12:00:00 PM11/29/21
to PLUMED users
Sorry -- that wasn't as clear as I'd like.  I did:
      ./configure --prefix=/usr/local —disable-python
     make -j 4

which gave me:
     ...
Building python interface for PLUMED
unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
         plumed_program_name=plumed \
         plumed_force_cython=yes \
         plumed_version=2.7.2 \
         plumed_include_dir=../src/wrapper \
         plumed_default_kernel="$PWD/../src/lib/libplumedKernel.so" \
         python setup.py build_ext -i
Module name plumed
Version number 2.7.2
Hardcoded PLUMED_KERNEL /home/bharland/plumed-2.7.2/src/lib/libplumedKernel.so
plumed_force_cython=yes
importing cython
running build_ext

And then:
     [... gromacs-2021.4]$ plumed patch -p

gives:
plumed: error while loading shared libraries: libplumedKernel.so: cannot open sh
ared object file: No such file or directory


Giovanni Bussi

unread,
Nov 29, 2021, 12:08:28 PM11/29/21
to plumed...@googlegroups.com
Did you set ld_lbrary_path as I wrote below?

--
Sent from Gmail mobile

Ben Harland

unread,
Nov 29, 2021, 12:30:08 PM11/29/21
to PLUMED users
Whoops -- sorry!  I've now added the path to my libplumedKernel.so to LD_LIBRARY_PATH.  Patching gives 'detecting previous patch' warnings and appears to have skipped doing anything.  Doing:
     plumed patch -p -f

gets me further, but trying to run still gives:
     gmx mdrun -s topol.tpr -nsteps 5000 -plumed plumed.dat

Error in user input: Invalid command-line options Unknown command-line option -plumed

Giovanni Bussi

unread,
Dec 1, 2021, 12:20:53 PM12/1/21
to plumed...@googlegroups.com
You are using a non-patched version of plumed.

Please follow the instructions on how to patch gromacs and then compile it. I suggest you to start from a clean gromacs copy

Giovanni


Ben Harland

unread,
Dec 6, 2021, 11:09:55 AM12/6/21
to PLUMED users
Thanks for all your help.  Patching before evoking gromacs' cmake was the key.
Reply all
Reply to author
Forward
0 new messages