[CP2K-user] [CP2K:18855] Problems with CP2K+PLUMED build

Milner, Scott Thomas stm9 at psu.edu
Thu May 25 12:49:11 UTC 2023


Matthias:  Adding —lplumed to LIBS worked, thank you.

I had previously tried putting an explicit path in LIBS, i.e.,
-L/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib

which did not work.

Note that the instructions on the CP2K HOWTO webpage https://www.cp2k.org/howto:install_with_plumed
make no mention of adding —lplumed to LIBS,
and indeed make no mention of —with-plumed being a toolchain option
(which I only discovered by browsing in install_cp2k_toolchain.sh,
after your email implied that PLUMED could be installed via toolchain).
It would be helpful if the instructions on the HOWTO page were clarified.

Scott Milner
William H. Joyce Professor
The Pennsylvania State University
Department of Chemical Engineering
204 CBE Building
University Park, PA 16802
(814) 863-9355
stm9 at psu.edu<mailto:stm9 at psu.edu>

On May 25, 2023, at 4:46 AM, Krack Matthias <matthias.krack at psi.ch<mailto:matthias.krack at psi.ch>> wrote:

Did you add also “-lplumed” to LIBS?
The toolchain adds PLUMED_LIBS=”-lplumed -ldl -lstdc++ -lz -ldl” to LIBS.

From: cp2k at googlegroups.com<mailto:cp2k at googlegroups.com> <cp2k at googlegroups.com<mailto:cp2k at googlegroups.com>> on behalf of Scott Milner <stm9 at psu.edu<mailto:stm9 at psu.edu>>
Date: Thursday, 25 May 2023 at 02:09
To: cp2k <cp2k at googlegroups.com<mailto:cp2k at googlegroups.com>>
Subject: [CP2K:18847] Problems with CP2K+PLUMED build
After successfully building local.psmp architecture of CP2K, I tried to install CP2K+PLUMED.  This failed, as I describe below.

1) I built PLUMED from source without errors, using the standard procedure:

     ./configure --prefix=/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe
     make
     make install

2) I created an architecture file local_PLUMED.psmp file by modifying local.psmp, with these changes , following the instructions on the cp2k.org<http://cp2k.org/> website
( https://www.cp2k.org/howto:install_with_plumed):

a) lines added at the top

     include /storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/src/lib/Plumed.inc
     EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)

b) added  -D__PLUMED2 to DFLAGS

c) added  -lz -ldl -lstdc++ to LIBS
d) I am not using OPENMPI, so I did not add -lmpi_cxx -lrt to LIBS

3) Then the make command

     make ARCH=local_PLUMED VERSION=psmp

fails, with errors in which components of PLUMED are not found:

/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/lib/local_PLUMED/psmp/libcp2kmain.a(metadynamics.o): In function `metadynamics_mp_metadyn_finalise_plumed_':
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:208: undefined reference to `plumed_gfinalize'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/lib/local_PLUMED/psmp/libcp2kmain.a(metadynamics.o): In function `metadynamics_mp_metadyn_integrator_':
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:299: undefined reference to `plumed_gcmd'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:300: undefined reference to `plumed_gcmd'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:301: undefined reference to `plumed_gcmd'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:302: undefined reference to `plumed_gcmd'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:303: undefined reference to `plumed_gcmd'
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/lib/local_PLUMED/psmp/libcp2kmain.a(metadynamics.o):/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:304: more undefined references to `plumed_gcmd' follow

But the directory
/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/src/lib/
does contain Plumed.inc, with the following contents:

PLUMED_RUNTIME_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumedWrapper.a" -ldl
PLUMED_STATIC_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.a" -ldl  -lstdc++ -lz -ldl   -rdynamic -Wl,-Bsymbolic -fopenmp
PLUMED_SHARED_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.so" -ldl
PLUMED_RUNTIME_DEPENDENCIES=
PLUMED_STATIC_DEPENDENCIES= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.a"
PLUMED_SHARED_DEPENDENCIES= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.so"
PLUMED_FORTRAN= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/fortran/plumed.f90"
PLUMED_FORTRAN08= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/fortran/plumed_f08.f90"

And the directory
/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib
does contain the library libplumed.a;
and libplumed.a does contain the object PlumedStatic.o;
and PlumedStatic.o does contain the missing items:

(base) [stm9 at submit03 lib]$ nm PlumedStatic.o | grep plumed_gcmd
0000000000000eb0 T plumed_gcmd
0000000000000ed0 T plumed_gcmd_safe
(base) [stm9 at submit03 lib]$ nm PlumedStatic.o | grep plumed_gfinalize
0000000000000ee0 T plumed_gfinalize

I have tried modifying local_PLUMED.psmp, by
adding -L/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib to LIBS;
adding -I/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/include to CFLAGS and FCFLAGS;
and adding -L/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib to LDFLAGS;
with exactly the same errors resulting.


--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/a8864437-9ea1-4ce4-a89e-be72380b2511n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/a8864437-9ea1-4ce4-a89e-be72380b2511n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cp2k/WyGfl5D1juQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cp2k+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZRAP278MB08277956CEA0823833B63C7FF4469%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM<https://groups.google.com/d/msgid/cp2k/ZRAP278MB08277956CEA0823833B63C7FF4469%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/1FCE8F8F-C165-4BC6-8358-2654B4501C69%40psu.edu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230525/60c00745/attachment-0001.htm>


More information about the CP2K-user mailing list