[CP2K-user] [CP2K:18850] Problems with CP2K+PLUMED build
Krack Matthias
matthias.krack at psi.ch
Thu May 25 08:46:25 UTC 2023
Did you add also “-lplumed” to LIBS?
The toolchain adds PLUMED_LIBS=”-lplumed -ldl -lstdc++ -lz -ldl” to LIBS.
From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Scott Milner <stm9 at psu.edu>
Date: Thursday, 25 May 2023 at 02:09
To: cp2k <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 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 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/ZRAP278MB08277956CEA0823833B63C7FF4469%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230525/7c288169/attachment-0001.htm>
More information about the CP2K-user
mailing list