Segmentation fault with gcc 7.2.0

Anton Kudelin archm... at gmail.com
Mon Oct 16 14:28:02 UTC 2017


Hi all,

I'm getting following error while compiling CP2K (4.1, trunk) with gcc 
7.2.0:

==19372== Memcheck, a memory error detector
==19372== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19372== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==19372== Command: ./cp2k.sopt -i H2O_grad_gpw.inp -o H2O_grad_gpw.out
==19372== 
At line 1015 of file cp2k-5.0/src/motion/bfgs_optimizer.F
Fortran runtime warning: An array temporary was created for argument 'r1' 
of procedure 'dist_second_deriv'
At line 1008 of file cp2k-5.0/src/motion/bfgs_optimizer.F
Fortran runtime warning: An array temporary was created for argument 'r1' 
of procedure 'dist_second_deriv'
At line 1544 of file cp2k-5.0/src/common/mathlib.F
Fortran runtime warning: An array temporary was created for argument 'a' of 
procedure 'diag'
At line 1544 of file cp2k-5.0/src/common/mathlib.F
Fortran runtime warning: An array temporary was created for argument 'v' of 
procedure 'diag'
At line 318 of file cp2k-5.0/src/atom_operators.F
Fortran runtime warning: An array temporary was created for argument 'a' of 
procedure 'dgesv'
At line 318 of file cp2k-5.0/src/atom_operators.F
Fortran runtime warning: An array temporary was created for argument 'b' of 
procedure 'dgesv'
==19372== Jump to the invalid address stated on the next line
==19372==    at 0x0: ???
==19372==    by 0x1FFEFF599F: ???
==19372==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19372== 

Program received signal SIGSEGV: Segmentation fault - invalid memory 
reference.

Backtrace for this error:
#0  0xbf8b91f in ???
#1  0x0 in ???
==19372== 
==19372== Process terminating with default action of signal 11 (SIGSEGV): 
dumping core
==19372==    at 0xAFC7C1E: raise (in /usr/lib/libpthread-2.26.so)
==19372==    by 0xBF8B91F: ??? (in /usr/lib/libc-2.26.so)
==19372== 
==19372== HEAP SUMMARY:
==19372==     in use at exit: 39,873,124 bytes in 121,430 blocks
==19372==   total heap usage: 770,577 allocs, 649,147 frees, 250,615,339 
bytes allocated
==19372== 
==19372== LEAK SUMMARY:
==19372==    definitely lost: 0 bytes in 0 blocks
==19372==    indirectly lost: 0 bytes in 0 blocks
==19372==      possibly lost: 110,304 bytes in 4 blocks
==19372==    still reachable: 39,762,820 bytes in 121,426 blocks
==19372==         suppressed: 0 bytes in 0 blocks
==19372== Rerun with --leak-check=full to see details of leaked memory
==19372== 
==19372== For counts of detected and suppressed errors, rerun with: -v
==19372== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

All other programs linked with libc and libpthread work well. Any ideas how 
to fix?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20171016/4a43bf07/attachment.htm>


More information about the CP2K-user mailing list