<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Did you add also
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;mso-fareast-language:EN-US">“-lplumed</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">” to
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;mso-fareast-language:EN-US">LIBS</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">The toolchain adds
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;mso-fareast-language:EN-US">PLUMED_LIBS=”-lplumed -ldl -lstdc++ -lz -ldl”</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> to
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;mso-fareast-language:EN-US">LIBS</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">cp2k@googlegroups.com <cp2k@googlegroups.com> on behalf of Scott Milner <stm9@psu.edu><br>
<b>Date: </b>Thursday, 25 May 2023 at 02:09<br>
<b>To: </b>cp2k <cp2k@googlegroups.com><br>
<b>Subject: </b>[CP2K:18847] Problems with CP2K+PLUMED build<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">After successfully building local.psmp architecture of CP2K, I tried to install CP2K+PLUMED. This failed, as I describe below.<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">1) I built PLUMED from source without errors, using the standard procedure:<br>
<br>
./configure --prefix=/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe<br>
make<br>
make install<br>
<br>
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<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">( https://www.cp2k.org/howto:install_with_plumed):<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><br>
a) lines added at the top<br>
<br>
include /storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/src/lib/Plumed.inc<br>
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)<br>
<br>
b) added -D__PLUMED2 to DFLAGS<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span style="font-size:11.0pt">c) added -lz -ldl -lstdc++ to LIBS<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">d) I am not using OPENMPI, so I did not add -lmpi_cxx -lrt to LIBS<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><br>
3) Then the make command<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> make ARCH=local_PLUMED VERSION=psmp<br>
<br>
fails, with errors in which components of PLUMED are not found:<br>
<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/lib/local_PLUMED/psmp/libcp2kmain.a(metadynamics.o): In function `metadynamics_mp_metadyn_finalise_plumed_':<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:208: undefined reference to `plumed_gfinalize'<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/lib/local_PLUMED/psmp/libcp2kmain.a(metadynamics.o): In function `metadynamics_mp_metadyn_integrator_':<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:299: undefined reference to `plumed_gcmd'<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:300: undefined reference to `plumed_gcmd'<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:301: undefined reference to `plumed_gcmd'<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:302: undefined reference to `plumed_gcmd'<br>
/storage/group/stm9/default/SOFTWARE/cp2k-2023.1-intel/src/metadynamics.F:303: undefined reference to `plumed_gcmd'<br>
/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<br>
<br>
But the directory<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/src/lib/<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">does contain Plumed.inc, with the following contents:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><br>
PLUMED_RUNTIME_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumedWrapper.a" -ldl<br>
PLUMED_STATIC_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.a" -ldl -lstdc++ -lz -ldl -rdynamic -Wl,-Bsymbolic -fopenmp<br>
PLUMED_SHARED_LOAD= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.so" -ldl<br>
PLUMED_RUNTIME_DEPENDENCIES=<br>
PLUMED_STATIC_DEPENDENCIES= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.a"<br>
PLUMED_SHARED_DEPENDENCIES= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/libplumed.so"<br>
PLUMED_FORTRAN= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/fortran/plumed.f90"<br>
PLUMED_FORTRAN08= "/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib/plumed/fortran/plumed_f08.f90"<br>
<br>
And the directory <br>
/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">does contain the library libplumed.a;<br>
and libplumed.a does contain the object PlumedStatic.o;<br>
and PlumedStatic.o does contain the missing items:<br>
<br>
(base) [stm9@submit03 lib]$ nm PlumedStatic.o | grep plumed_gcmd<br>
0000000000000eb0 T plumed_gcmd<br>
0000000000000ed0 T plumed_gcmd_safe<br>
(base) [stm9@submit03 lib]$ nm PlumedStatic.o | grep plumed_gfinalize<br>
0000000000000ee0 T plumed_gfinalize<br>
<br>
I have tried modifying local_PLUMED.psmp, by<br>
adding -L/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib to LIBS;<br>
adding -I/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/include to CFLAGS and FCFLAGS;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">and adding -L/storage/home/stm9/group/SOFTWARE/plumed-2.8.2/exe/lib to LDFLAGS;<br>
with exactly the same errors resulting.<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">--
<br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/a8864437-9ea1-4ce4-a89e-be72380b2511n%40googlegroups.com?utm_medium=email&utm_source=footer">
https://groups.google.com/d/msgid/cp2k/a8864437-9ea1-4ce4-a89e-be72380b2511n%40googlegroups.com</a>.<o:p></o:p></span></p>
</div>
</body>
</html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZRAP278MB08277956CEA0823833B63C7FF4469%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/ZRAP278MB08277956CEA0823833B63C7FF4469%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM</a>.<br />