Buffer overflow in cp2k_shell.popt
Eric Hermes
erich... at gmail.com
Mon Mar 7 16:43:47 UTC 2016
Hello,
I am attempting to compile CP2K 3.0 on our campus cluster, and while I can
get cp2k.popt and cp2k.psmp to run without error, attempting to run
cp2k_shell.{popt,psmp} results in a buffer overflow message:
[ehermes at aci-001 cp2k]$ /home/ehermes/local/openmpi-1.10.2/bin/mpirun -np 1
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt
*** buffer overflow detected ***:
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt
terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x39d4d02567]
/lib64/libc.so.6[0x39d4d00450]
/lib64/libc.so.6[0x39d4cff8a9]
/lib64/libc.so.6(_IO_default_xsputn+0xc9)[0x39d4c74639]
/lib64/libc.so.6(_IO_vfprintf+0x11d8)[0x39d4c451a8]
/lib64/libc.so.6(__vsprintf_chk+0x9d)[0x39d4cff94d]
/lib64/libc.so.6(__sprintf_chk+0x7f)[0x39d4cff88f]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt(fname_from_piped_fd+0x9f)[0x2bae4cf]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt(for__compute_filename+0x163c)[0x2bae39c]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt(for__open_proc+0xc9)[0x2baf509]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt(for__open_default+0x36d)[0x2b67a5d]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt(for_read_seq_fmt+0x514)[0x2b77f04]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt[0x41674a]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt[0x4159de]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x39d4c1ed5d]
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt[0x4158e9]
======= Memory map: ========
00400000-03010000 r-xp 00000000 00:24 10574595098197570988
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt
0320f000-033d4000 rw-p 02c0f000 00:24 10574595098197570988
/home/ehermes/build/cp2k-3.0/exe/Linux-x86-64-intel/cp2k_shell.popt
033d4000-03687000 rw-p 00000000 00:00 0
04b51000-04c57000 rw-p 00000000 00:00 0
04c57000-04c67000 rw-p 00000000 00:00 0
04c67000-04c71000 rw-p 00000000 00:00 0
04c71000-04c72000 rw-p 00000000 00:00 0
04c72000-04c73000 rw-p 00000000 00:00 0
04c73000-04cb1000 rw-p 00000000 00:00 0
04cb1000-05d3c000 rw-p 00000000 00:00 0
39d4800000-39d4820000 r-xp 00000000 08:02 2097201
/lib64/ld-2.12.so
39d4a1f000-39d4a20000 r--p 0001f000 08:02 2097201
/lib64/ld-2.12.so
39d4a20000-39d4a21000 rw-p 00020000 08:02 2097201
/lib64/ld-2.12.so
39d4a21000-39d4a22000 rw-p 00000000 00:00 0
39d4c00000-39d4d8a000 r-xp 00000000 08:02 2097533
/lib64/libc-2.12.so
39d4d8a000-39d4f8a000 ---p 0018a000 08:02 2097533
/lib64/libc-2.12.so
39d4f8a000-39d4f8e000 r--p 0018a000 08:02 2097533
/lib64/libc-2.12.so
39d4f8e000-39d4f8f000 rw-p 0018e000 08:02 2097533
/lib64/libc-2.12.so
39d4f8f000-39d4f94000 rw-p 00000000 00:00 0
39d5000000-39d5017000 r-xp 00000000 08:02 2097537
/lib64/libpthread-2.12.so
39d5017000-39d5217000 ---p 00017000 08:02 2097537
/lib64/libpthread-2.12.so
39d5217000-39d5218000 r--p 00017000 08:02 2097537
/lib64/libpthread-2.12.so
39d5218000-39d5219000 rw-p 00018000 08:02 2097537
/lib64/libpthread-2.12.so
39d5219000-39d521d000 rw-p 00000000 00:00 0
39d5400000-39d5402000 r-xp 00000000 08:02 2097544
/lib64/libdl-2.12.so
39d5402000-39d5602000 ---p 00002000 08:02 2097544
/lib64/libdl-2.12.so
39d5602000-39d5603000 r--p 00002000 08:02 2097544
/lib64/libdl-2.12.so
39d5603000-39d5604000 rw-p 00003000 08:02 2097544
/lib64/libdl-2.12.so
39d5800000-39d580d000 r-xp 00000000 08:02 2519219
/usr/lib64/libosmcomp.so.3.0.6
39d580d000-39d5a0c000 ---p 0000d000 08:02 2519219
/usr/lib64/libosmcomp.so.3.0.6
39d5a0c000-39d5a0d000 rw-p 0000c000 08:02 2519219
/usr/lib64/libosmcomp.so.3.0.6
39d5c00000-39d5c83000 r-xp 00000000 08:02 2097549
/lib64/libm-2.12.so
39d5c83000-39d5e82000 ---p 00083000 08:02 2097549
/lib64/libm-2.12.so
39d5e82000-39d5e83000 r--p 00082000 08:02 2097549
/lib64/libm-2.12.so
39d5e83000-39d5e84000 rw-p 00083000 08:02 2097549
/lib64/libm-2.12.so
39d6000000-39d6007000 r-xp 00000000 08:02 2097541
/lib64/librt-2.12.so
39d6007000-39d6206000 ---p 00007000 08:02 2097541
/lib64/librt-2.12.so
39d6206000-39d6207000 r--p 00006000 08:02 2097541
/lib64/librt-2.12.so
39d6207000-39d6208000 rw-p 00007000 08:02 2097541
/lib64/librt-2.12.so
39d6400000-39d6413000 r-xp 00000000 08:02 2519329
/usr/lib64/librdmacm.so.1.0.0
39d6413000-39d6612000 ---p 00013000 08:02 2519329
/usr/lib64/librdmacm.so.1.0.0
39d6612000-39d6613000 rw-p 00012000 08:02 2519329
/usr/lib64/librdmacm.so.1.0.0
39d6613000-39d6614000 rw-p 00000000 00:00 0
39d6800000-39d6816000 r-xp 00000000 08:02 2097561
/lib64/libgcc_s-4.4.6-20120305.so.1
39d6816000-39d6a15000 ---p 00016000 08:02 2097561
/lib64/libgcc_s-4.4.6-20120305.so.1
39d6a15000-39d6a16000 rw-p 00015000 08:02 2097561
/lib64/libgcc_s-4.4.6-20120305.so.1
39d7000000-39d70e8000 r-xp 00000000 08:02 2518921
/usr/lib64/libstdc++.so.6.0.13
39d70e8000-39d72e8000 ---p 000e8000 08:02 2518921
/usr/lib64/libstdc++.so.6.0.13
39d72e8000-39d72ef000 r--p 000e8000 08:02 2518921
/usr/lib64/libstdc++.so.6.0.13
39d72ef000-39d72f1000 rw-p 000ef000 08:02 2518921
/usr/lib64/libstdc++.so.6.0.13
39d72f1000-39d7306000 rw-p 00000000 00:00 0
39dbc00000-39dbc08000 r-xp 00000000 08:02 2523958
/usr/lib64/libnuma.so.1
39dbc08000-39dbe08000 ---p 00008000 08:02 2523958
/usr/lib64/libnuma.so.1
39dbe08000-39dbe09000 rw-p 00008000 08:02 2523958
/usr/lib64/libnuma.so.1
39e0c00000-39e0c02000 r-xp 00000000 08:02 2097568
/lib64/libutil-2.12.so
39e0c02000-39e0e01000 ---p 00002000 08:02 2097568
/lib64/libutil-2.12.so
39e0e01000-39e0e02000 r--p 00001000 08:02 2097568
/lib64/libutil-2.12.so
39e0e02000-39e0e03000 rw-p 00002000 08:02 2097568
/lib64/libutil-2.12.so
2b020eeb6000-2b020eeb8000 rw-p 00000000 00:00 0
2b020eeb8000-2b020f608000 r-xp 00000000 00:24 13262192253798162836
/home/ehermes/build/intel-2016/libmkl_intel_lp64.so
2b020f608000-2b020f808000 ---p 00750000 00:24 13262192253798162836
/home/ehermes/build/intel-2016/libmkl_intel_lp64.so
2b020f808000-2b020f809000 r--p 00750000 00:24 13262192253798162836
/home/ehermes/build/intel-2016/libmkl_intel_lp64.so
2b020f809000-2b020f819000 rw-p 00751000 00:24 13262192253798162836
/home/ehermes/build/intel-2016/libmkl_intel_lp64.so
2b020f819000-2b020f81e000 rw-p 00000000 00:00 0
2b020f81e000-2b02100d0000 r-xp 00000000 00:24 9849255810717667483
/home/ehermes/build/intel-2016/libmkl_sequential.so
2b02100d0000-2b02102cf000 ---p 008b2000 00:24 9849255810717667483
/home/ehermes/build/intel-2016/libmkl_sequential.so
2b02102cf000-2b02102d0000 r--p 008b1000 00:24 9849255810717667483
/home/ehermes/build/intel-2016/libmkl_sequential.so
2b02102d0000-2b02102e0000 rw-p 008b2000 00:24 9849255810717667483
/home/ehermes/build/intel-2016/libmkl_sequential.so
2b02102e0000-2b02119ed000 r-xp 00000000 00:24 12668368405913819111
/home/ehermes/build/intel-2016/libmkl_core.so
2b02119ed000-2b0211bec000 ---p 0170d000 00:24 12668368405913819111
/home/ehermes/build/intel-2016/libmkl_core.so
2b0211bec000-2b0211bf4000 r--p 0170c000 00:24 12668368405913819111
/home/ehermes/build/intel-2016/libmkl_core.so
2b0211bf4000-2b0211c15000 rw-p 01714000 00:24 12668368405913819111
/home/ehermes/build/intel-2016/libmkl_core.so
2b0211c15000-2b0211c68000 rw-p 00000000 00:00 0
2b0211c68000-2b02122c5000 r-xp 00000000 00:24 9980521380413069202
/home/ehermes/build/intel-2016/libmkl_scalapack_lp64.so
2b02122c5000-2b02124c5000 ---p 0065d000 00:24 9980521380413069202
/home/ehermes/build/intel-2016/libmkl_scalapack_lp64.so
2b02124c5000-2b02124c6000 r--p 0065d000 00:24 9980521380413069202
/home/ehermes/build/intel-2016/libmkl_scalapack_lp64.so
2b02124c6000-2b02124ca000 rw-p 0065e000 00:24 9980521380413069202
/home/ehermes/build/intel-2016/libmkl_scalapack_lp64.so
2b02124ca000-2b021254d000 rw-p 00000000 00:00 0
2b021254d000-2b0212588000 r-xp 00000000 00:24 13800340943049569894
/home/ehermes/build/intel-2016/libmkl_blacs_openmpi_lp64.so
2b0212588000-2b0212788000 ---p 0003b000 00:24 13800340943049569894
/home/ehermes/build/intel-2016/libmkl_blacs_openmpi_lp64.so
2b0212788000-2b0212789000 r--p 0003b000 00:24 13800340943049569894
/home/ehermes/build/intel-2016/libmkl_blacs_openmpi_lp64.so
2b0212789000-2b021278a000 rw-p 0003c000 00:24 13800340943049569894
/home/ehermes/build/intel-2016/libmkl_blacs_openmpi_lp64.so
2b02127a9000-2b02127aa000 rw-p 00000000 00:00 0
2b02127aa000-2b02127d8000 r-xp 00000000 00:24 10793675450717407209
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_usempif08.so.11.1.0
2b02127d8000-2b02129d7000 ---p 0002e000 00:24 10793675450717407209
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_usempif08.so.11.1.0
2b02129d7000-2b02129d9000 rw-p 0002d000 00:24 10793675450717407209
/home/ehermes/local/openmpi-1.10.* READY
2/lib/libmpi_usempif08.so.11.1.0
2b02129d9000-2b02129da000 rw-p 00000000 00:00 0
2b02129da000-2b02129e3000 r-xp 00000000 00:24 13412784955665253982
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_usempi_ignore_tkr.so.6.1.0
2b02129e3000-2b0212be2000 ---p 00009000 00:24 13412784955665253982
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_usempi_ignore_tkr.so.6.1.0
2b0212be2000-2b0212be3000 rw-p 00008000 00:24 13412784955665253982
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_usempi_ignore_tkr.so.6.1.0
2b0212be3000-2b0212c49000 r-xp 00000000 00:24 9895756149091167911
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_mpifh.so.12.0.0
2b0212c49000-2b0212e48000 ---p 00066000 00:24 9895756149091167911
/home/ehermes/local/openmpi-1.10.2/lib/libmpi_mpifh.so.12.0.0--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 1464388 on node aci-001 exited
on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
Here is my arch file (Linux-x86-64-intel.popt):
# Configuration for Haswell Linux Supercluster
# Haswell is the codename for the Intel processor
# successor to the Ivy Bridge microarchitecture.
# See http://ark.intel.com/products/codename/42174/Haswell
# Intel Composer v.15 or later - BullMPI/OpenMPI + OMP 3.0 (or later)
# Processor Intel Haswell 12-Core E5-2690
# Cluster IB 4x FDR Fat Tree / 9 blades socket
# (University of Strasbourg-University of Tokyo, 2015).
#### Version OpenMPI (+OMP)
CC = /home/ehermes/local/openmpi-1.10.2/bin/mpicc
CXX = /home/ehermes/local/openmpi-1.10.2/bin/mpicxx
CPP = /lib/cpp
FC = /home/ehermes/local/openmpi-1.10.2/bin/mpif90 -FR
FC_fixed = /home/ehermes/local/openmpi-1.10.2/bin/mpif90 -FI
LD = /home/ehermes/local/openmpi-1.10.2/bin/mpif90
#AR = /usr/bin/ar -r
# Use of xiar instead of ar eliminates several errors/warnings
AR =
/opt/intel-2016/compilers_and_libraries_2016.2.181/linux/bin/intel64/xiar -r
#Better with mkl (intel lapack/blas) only
#DFLAGS = -D__INTEL -D__FFTSG -D__parallel
#If you want to use BLACS and SCALAPACK use the flags below
DFLAGS = -D__MKL -D__INTEL_COMPILER -D__FFTW3 -D__FFTMKL -D__LIBINT
-D__LIBXSMM -D__LIBXC -D__LIBPEXSI -D__INTEL -D__parallel -D__BLACS
-D__SCALAPACK
CPPFLAGS = -C $(DFLAGS) -P -traditional
-I/home/ehermes/build/libxc-2.2.2/src
-I/home/ehermes/build/pexsi_v0.9.0/fortran
-I/home/ehermes/build/libxsmm-1.2/include
-I/home/ehermes/build/libint-1.1.4/include -I/home/ehermes/build/libxc-2.2.2
FCFLAGS = -O3 -xHost -pc64 -funroll-loops
-I/home/ehermes/build/libxc-2.2.2/src
-I/home/ehermes/build/pexsi_v0.9.0/fortran
-I/home/ehermes/build/pexsi_v0.9.0/include -mkl=sequential
-I/home/ehermes/build/libxsmm-1.2/include
-I/home/ehermes/build/libint-1.1.4/include
-I/home/ehermes/build/libxc-2.2.2 -I${MKLROOT}/include -mkl=sequential
CFLAGS = $(FCFLAGS)
CXXFLAGS = $(FCFLAGS)
LDFLAGS = $(FCFLAGS) -L$(HOME)/lib
#If you want to use BLACS and SCALAPACK use the libraries below
LIBS = -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -lpthread -lm
-ldl -L/home/ehermes/build/libxc-2.2.2/src/.libs -lxcf90 -lxc
-L/home/ehermes/build/pexsi_v0.9.0/src -lpexsi_aci
-L/home/ehermes/build/SuperLU_DIST_3.3/lib -lsuperlu_dist_3.3
-L/home/ehermes/build/scotch_6.0.0/lib -lptscotchparmetis -lptscotch
-lptscotcherr -lscotchmetis -lscotch -lscotcherr
-L/home/ehermes/build/fftw3xf_2016 -lfftw3xf_intel
-L/home/ehermes/build/libxsmm-1.2/lib -lxsmm
-L/home/ehermes/build/libint-1.1.4/build/lib -lderiv -lint -lstdc++
OBJECTS_ARCHITECTURE = machine_intel.o
I am using the Intel Compiler and MKL libraries from Intel Parallel Studios
XE 2016 to compile CP2K and its dependencies. MKL provides
BLAS/LAPACK/ScaLAPACK, MPI is provided by OpenMPI 1.10.2, FFTW is provided
by the MKL fftw3xf interface, I am using libint 1.1.4 with the default
configuration, libxsmm 1.2, libxc 2.2.2, pexsi 0.9.0 configured with
SuperLU_DIST 3.3 and scotch/pt-scotch 6.0.0. I realize that this ARCH file
is a bit of a mess (I just realized looking at it that -mkl=sequential
appears twice in FCFLAGS...), but as far as I can tell it should be
correct. I based this arch file off of the default
Linux-Haswell-Intel.psmp, though this cluster does not have Haswell CPUs
(it has Xeon E5-2660). The only parameter that I am unsure about is "-pc64".
If anyone sees something obviously wrong with my arch file, please let me
know. Otherwise, I am unsure of how to diagnose the cause of this issue.
Thanks,
Eric Hermes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20160307/57041efb/attachment.htm>
More information about the CP2K-user
mailing list