[CP2K-user] [CP2K:13760] CP2K 7.1 memory leak

Paul Schwarz paul.... at freudenberg.com
Wed Aug 12 08:43:20 UTC 2020


Hi Ole,

I tried building the pdbg binary, but I came across "undefined reference" 
errors during compilation for libxsmm

/opt/chem/CP2K/cp2k-7.1.0/tools/build_utils/fypp -n 
--line-marker-format=gfortran5 
/opt/chem/CP2K/cp2k-7.1.0/src/eri_mme/eri_mme_lattice_summation.F 
eri_mme_lattice_summation.F90
/opt/chem/CP2K/cp2k-7.1.0/tools/toolchain/install/libxsmm-1.14/lib/libxsmm.a(libxsmm_gemm.o): 
In function `__real_dgemm_':
libxsmm_gemm.c:(.text.__real_dgemm_+0x1): undefined reference to `dgemm_'
/opt/chem/CP2K/cp2k-7.1.0/tools/toolchain/install/libxsmm-1.14/lib/libxsmm.a(libxsmm_gemm.o): 
In function `__real_sgemm_':
libxsmm_gemm.c:(.text.__real_sgemm_+0x1): undefined reference to `sgemm_'
/opt/chem/CP2K/cp2k-7.1.0/tools/toolchain/install/libxsmm-1.14/lib/libxsmm.a(libxsmm_gemm.o): 
In function `__real_dgemv_':
libxsmm_gemm.c:(.text.__real_dgemv_+0x1): undefined reference to `dgemv_'
/opt/chem/CP2K/cp2k-7.1.0/tools/toolchain/install/libxsmm-1.14/lib/libxsmm.a(libxsmm_gemm.o): 
In function `__real_sgemv_':
libxsmm_gemm.c:(.text.__real_sgemv_+0x1): undefined reference to `sgemv_'
collect2: error: ld returned 1 exit status
/opt/chem/CP2K/cp2k-7.1.0/obj/local/pdbg/all.dep:108: recipe for target 
'/opt/chem/CP2K/cp2k-7.1.0/exe/local/graph.pdbg' failed
make[3]: *** [/opt/chem/CP2K/cp2k-7.1.0/exe/local/graph.pdbg] Error 1

I used the standard local.pdbg that was created by toolchain.
Is this some sort of linking error? Any idea how to resolve that?


Best wishes,
Paul
Paul Schwarz schrieb am Dienstag, 11. August 2020 um 15:06:06 UTC+2:

> Hi Ole,
>
> thanks for your reply.
> I will try out the pdbg binary, and compare output to the known leaks.
>
>
> Paul
>
> Ole Schütt schrieb am Dienstag, 11. August 2020 um 14:16:53 UTC+2:
>
>> Hi Paul, 
>>
>> you can run the pdbg binary which has LeakSanitizer enabled. When CP2K 
>> exits it will print a detailed report of code locations that leaked 
>> memory. 
>>
>> Note that there are already a few known leaks which we usually ignore: 
>>
>>
>>
>> https://github.com/cp2k/cp2k/blob/master/tools/toolchain/scripts/install_gcc.sh#L165 
>>
>> Generally, those leaks are considered benign, but if nothing else show 
>> up then you might want to check them as well. 
>>
>> Cheers, 
>> Ole 
>>
>>
>> On 2020-08-11 13:54, Paul Schwarz wrote: 
>> > Dear CP2K developers, 
>> > 
>> > I downloaded the latest 7.1 version and used toolchain to install the 
>> > libraries libint, libxc, and libxsmm with the following command: 
>> > 
>> > $ ./install_cp2k_toolchain.sh --enable-omp --with-libxc=install 
>> > --with-libint=install --with-fftw=system --with-libxsmm=install 
>> > --with-mkl=system --with-elpa=no --with-cmake=system 
>> > --with-openblas=no --with-hdf5=system 
>> > 
>> > After the successfull installations, I used the resulting local.popt 
>> > to make an executable (without any further modifications). 
>> > 
>> > The used compilers were gcc, g++, and mpif90, which in my case is 
>> > Intel version 2019.5.281, and not OpenMPI. 
>> > 
>> > Running relaxation simulations of molecules on slab surfaces, I 
>> > experience an increasing memory usage. 
>> > 
>> > Sometimes the simulation relaxes fast enough, so that I don’t run 
>> > out of memory. 
>> > 
>> > Sometimes I run out of memory before the relaxation finishes. 
>> > 
>> > I call cp2k_shell.popt, since I run my relaxations via an ase 
>> > interface (but I guess it doesn’t matter, since there is no shell 
>> > binary, but just a link of the shell to cp2k.popt). 
>> > 
>> > Does anyone else experience memory issues? I have the same issue on a 
>> > HPC center, where a system admin installed the 7.1 version for me, and 
>> > here my jobs also crash due to running out of memory. 
>> > 
>> > Does someone have a suggestion as to what the problem is or how to 
>> > avoid it? 
>> > 
>> > Is there maybe a compiler flag/option I should avoid or put in? 
>> > 
>> > Best regards, 
>> > 
>> > Paul Schwarz 
>> > 
>> > -- 
>> > 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 cp... at googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/cp2k/d9628406-6b9d-4e00-8b6b-edfe1b765d54n%40googlegroups.com 
>> > [1]. 
>> > 
>> > 
>> > Links: 
>> > ------ 
>> > [1] 
>> > 
>> https://groups.google.com/d/msgid/cp2k/d9628406-6b9d-4e00-8b6b-edfe1b765d54n%40googlegroups.com?utm_medium=email&utm_source=footer 
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200812/d81ad967/attachment.htm>


More information about the CP2K-user mailing list