<div>The Linker uses environment variables. So you can de-install the other MPI or modify the environment variables. </div><div><br /></div><div>on is LD_LIBRARY_PATH</div><div><br /></div><div>best</div><div>johann</div><br /><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Friday, August 21, 2026 at 6:35:50 PM UTC+2 Martin Konôpka wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Dear Johann,</div><div><br></div><div>Thanks for your comment. Yes, it is so. And my yesterday's suspicion that I omitted to source the</div><div> /opt/intel/oneapi/2026.1/oneapi-vars.sh</div><div>script was not true; I did source the script. Later I even repeated the whole toolchain + build procedure and the result was again a binary with links to multiple MPI libraries. And not only MPI. I can see also a non-oneAPI LAPACK and ScaLAPACK there. The mis-linked libraries are at least these:</div><div><br></div><div> libscalapack-openmpi.so.2.1 => /lib/x86_64-linux-gnu/libscalapack-openmpi.so.2.1</div><div> liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3</div><div> libmpi.so.40 => /lib/x86_64-linux-gnu/libmpi.so.40</div><div><br></div><div>I do now know where is a central config file in which I could disable linking the undesired libraries. It will perhaps be simpler for me to uninstall the undesired MPI, LAPACK, etc libraries from the system. In the past I needed them because I was using a CP2K version installed from a standard ubuntu repository, similarly also a Quantum Espresso version. I will no more need the old versions from the ubuntu repository so that I can unistall them, also the undesired libraries.</div><div><br></div><div>Best,</div><div>Martin.</div><div><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">Dátum: piatok 21. augusta 2026, čas: 16:06:53 UTC+2, odosielateľ: Johann Pototschnig<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>The linker links to two mpi libraries, the oneapi one and </div><div>libmpi.so.40 => /lib/x86_64-linux-gnu/libmpi.so.40 (0x00007fa2f60c9000)</div><div><br></div><div>This probably causes the problems. You need to remove the system mpi from the linker, so it only links the oneapi one. </div><div><br></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Thursday, August 20, 2026 at 6:58:24 PM UTC+2 Martin Konôpka wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Frederick,</div><div><br></div><div>Yes, you are right. Despite trying to be VERY careful, I perhaps (?) forgot to run the script</div><div> /opt/intel/oneapi/2026.1/oneapi-vars.sh</div><div>in the shell in which I subsequently launched the toolchain script etc. (Possibly I ran the intel script in a different shell mistakenly.) I now clearly see the problems when I look at the output of the</div><div> ldd /dalsie/cp2k-2026.2/install/bin/cp2k.psmp</div><div>commands.</div><div>I attach two ldd outputs, one with the correct build (Linux Mint Zena) , the other with the incorrect build (Ubuntu 22.04).</div><div>I stress that I issued the ldd commands AFTER sourcing the scripts</div><div> /opt/intel/oneapi/2026.1/oneapi-vars.sh</div><div> /dalsie/cp2k-2026.2/install/cp2k_env</div><div><br></div><div>I will rebuild the CP2K on the ubuntu 22.04 and then I will do the regression tests. (I have not tried them yet.) As for Spack, I have not used it for the CP2K 2026.2 build process. If possible to use, I prefer the toolchain to Spack.</div><div><br></div><div>Once more thank you very much for helping me.</div><div><br></div><div>Best,</div><div>Martin.</div><div class="gmail_quote"><div dir="auto" class="gmail_attr">Dátum: štvrtok 20. augusta 2026, čas: 17:26:13 UTC+2, odosielateľ: Frederick Stein<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Martin,</div><div>I guess, CP2K picked up the system-provided OpenMPI-implementation in some places (see the end of the cmake.log_Ubuntu_22.04.). Please double-check with your Spack-log files. Have you tried to run the regression tests beforehand? Without any further information it is hard to tell which library picked up the wrong MPI-installation. You can add the TRACE keyword to the &GLOBAL section of your input file and check where CP2K fails. If you are lucky, you may even see where it fails because a routine wasn't left.</div><div>Best,</div><div>Frederick</div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">Martin Konôpka schrieb am Donnerstag, 20. August 2026 um 16:54:24 UTC+2:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Frederick,</div><div><br></div><div>Thank you for the response. Yes, at the moment I have at hand all such files from my builds on the Linux Mint Zena and on the Ubuntu 22.04. I attach them, also the log files from cmake and the files (or only parts of them) which I created by copy-pasting my commands and their standard outputs printed on the terminal.</div><div><br></div><div>If needed, I can later send such files form my build on Ubuntu 26.04 (which is a notebook that I do not have at hand at the moment).</div><div><br></div><div>BTW, the toolchain script on 22.04 recommended to build the binaries with the command</div><div> ./build_cp2k.sh -j 18</div><div>In my actual build I used only 16 (not 18). I hope this is not the source of the reported problem.</div><div><br></div><div>Best,</div><div>Martin.</div><div class="gmail_quote"><div dir="auto" class="gmail_attr">Dátum: štvrtok 20. augusta 2026, čas: 15:56:02 UTC+2, odosielateľ: Frederick Stein<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Martin,</div><div>Do you have log files from the build process? If you have a different MPI implementation on your system, it could be that one of those were picked up somewhere.</div><div>Best,</div><div>Frederick</div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">Martin Konôpka schrieb am Donnerstag, 20. August 2026 um 14:30:49 UTC+2:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear CP2K experts,</div><div><br></div><div>I have built CP2K 2026.2 on several Linux workstations and I am trying to run it. In each case I used the Intel oneAPI 2026.1 compilers and libraries installed in the same way. Also the CP2K was built on each of the workstations in the same way with one minor excpetion - see below. I used the toolchain. The results are different however:</div><div><br></div><div>Ubuntu 26.04: My CP2K build works.</div><div>Linux Mint Zena (based on ubuntu 24.04): My CP2K build works.</div><div>Ubuntu 22.04: My CP2K build fails with the message</div><div><br></div><div>*** The MPI_Comm_c2f() function was called before MPI_INIT was invoked.<br>*** This is disallowed by the MPI standard.<br>*** Your MPI job will now abort.<br>[oslik:116792] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!<br><br></div><div>There is no error message in the usual output file. I attach it, as well as my script used to launch the CP2K executable. As for the input file, it is the same as in my recent post here:</div><div><a href="https://groups.google.com/g/cp2k/c/_B6BE1Q78L0" rel="nofollow" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/g/cp2k/c/_B6BE1Q78L0&source=gmail&ust=1787417420686000&usg=AOvVaw0j7em3CLHuumjAA7NakblO">https://groups.google.com/g/cp2k/c/_B6BE1Q78L0</a></div><div><br></div><div>To configure the CP2K on the two newer OSs, I issued the command</div><div><br></div><div>./install_cp2k_toolchain.sh --mpi-mode=intelmpi --math-mode=mkl --libint-lmax=6 --with-ifx=yes --with-cmake=system --with-eigen=install --with-dftd4=install</div><div><br></div><div>On ubuntu 22.04 I used the same with the exception of cmake; I used install instead of system, because the system cmake was too old.</div><div><br></div><div>As for the oneAPI environment one the ubuntu 22.04, I <span><span lang="en" dir="ltr"><span>successfully used it to build Quantum Espresso 7.5 (and it works with the Intel MPI), so I really do not know what is the cause of the problem with the CP2K and</span></span></span> would greatly appreciate your opinions and advices.</div><div><br></div><div>Best regards</div><div>Martin Konôpka</div></blockquote></div></blockquote></div></blockquote></div></blockquote></div></blockquote></div></blockquote></div></blockquote></div>
<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 visit <a href="https://groups.google.com/d/msgid/cp2k/e7ece083-309e-41fd-b82d-cf33fa12a8bfn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/e7ece083-309e-41fd-b82d-cf33fa12a8bfn%40googlegroups.com</a>.<br />