cp2k-2.3 regression tests crashing

Dominik 'Rathann' Mierzejewski rat... at gmail.com
Mon Dec 31 18:40:49 UTC 2012


Dear developers,
while building cp2k-2.3 package for Fedora and CentOS/RHEL, I noticed
that some of the regression tests were crashing in libint wrapper.
All in all, 89 out of 2243 tests are failing. Is this expected?

I'm attaching the patch I'm applying to the build (makes use of
system-provided makedepf90, enables libint linking, disables CVS fetch
before regtests and disables the use of MPI for regtests).

Here are the compiler and library versions:
atlas-3.8.4-2.el6.x86_64
gcc-gfortran-4.4.6-4.el6.x86_64
fftw-3.2.1-3.1.el6.x86_64
libint-1.1.4-4.el6.x86_64
libderiv-1.1.4-4.el6.x86_64

My arch file for this binary is Linux-x86-64-gfortran.sopt:
===
CC       = cc
CPP      =

FC       = gfortran
LD       = gfortran

AR       = ar -r

CPPFLAGS =
DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT
-D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5
OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
FCFLAGS  = $(OPTFLAGS) -ffree-form $(DFLAGS)
LDFLAGS  = $(FCFLAGS)
LIBS     = -llapack -lf77blas -latlas -lfftw3 -lint -lderiv

OBJECTS_ARCHITECTURE = machine_gfortran.o
===

However, the OPTFLAGS are overridden with Fedora's defaults at build
time:
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic

Here's the list of directories in which tests fail and some sample input
identifiers:

tests/QMMM/QS/regtest-gapw (H2O-qmmm)
tests/QS/regtest-admm (CH3-BP-C, CH3-BP-M, CH3-BP-N, CH4-BP-C, CH4-BP-M, CH4-BP-N, ...)
tests/QS/regtest-hfx
tests/QS/regtest-hfx-periodic (CH3-coul, ...)
tests/QS/regtest-hfx-stress
tests/QS/regtest-hfx-wfn-fitting
tests/QS/regtest-hybrid
tests/QS/regtest-mp2 (H2O-B2PL, ...)

Let me know if you want the complete list of failing tests and stack
traces as it's quite long. All stack traces look similar, here's a sample one:

Core was generated by `/home/rathann/build/BUILD/cp2k-2.3/exe/Linux-x86-64-gfortran/cp2k.sopt H2O-qmmm'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) where
#0  0x0000000000000000 in ?? ()
#1  0x0000000000d899de in hfx_libint_wrapper::get_eris (n_d=<value optimized out>, n_c=<value optimized out>, n_b=<value optimized out>, n_a=<value optimized out>, lib=<value optimized out>, prim=<value optimized out>, p_work=..., a_mysize=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/hfx_libint_wrapper.F:229
#2  0x0000000000d852f7 in hfx_libint_interface::evaluate_eri_screen (lib=..., a=..., b=..., c=..., d=..., zeta_a=<value optimized out>, zeta_b=8.3043855491999992, zeta_c=8.3744350009000001, zeta_d=8.3043855491999992, n_a=0, n_b=1, n_c=0, n_d=1, max_val=0, potential_parameter=..., r1=1.2159542922208637, r2=1.2159542922208637, p_work=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/hfx_libint_interface.F:1294
#3  0x0000000000daeb30 in hfx_screening_methods::calc_screening_functions (qs_env=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/hfx_screening_methods.F:418
#4  0x0000000000d797a5 in hfx_energy_potential::integrate_four_center (qs_env=0x48dca90, ks_matrix=..., energy=0x4aed8c0, rho=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/hfx_energy_potential.F:845
#5  0x0000000000d59f46 in hfx_admm_utils::hfx_ks_matrix (ks_env=0x5123d50, qs_env=0x48dca90, ks_matrix=..., rho=0x503e900, energy=0x4aed8c0, calculate_forces=.FALSE., just_energy=.FALSE., v_rspace_new=..., v_tau_rspace=..., error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/hfx_admm_utils.F:312
#6  0x00000000006a9796 in qs_ks_methods::qs_ks_build_kohn_sham_matrix (ks_env=0x5123d50, qs_env=0x48dca90, ks_matrix=..., rho=0x503e900, energy=0x4aed8c0, calculate_forces=.FALSE., just_energy=.FALSE., print_active=Cannot access memory at address 0x0)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_ks_methods.F:717
#7  0x00000000006ae431 in qs_ks_methods::qs_ks_update_qs_env (ks_env=0x5123d50, qs_env=0x48dca90, calculate_forces=<value optimized out>, just_energy=<value optimized out>, print_active=Cannot access memory at address 0x0)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_ks_methods.F:1921
#8  0x00000000007660ce in qs_scf::scf_env_do_scf (scf_env=0x503d780, qs_env=0x48dca90, converged=.TRUE., should_stop=.FALSE., error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_scf.F:638
#9  0x000000000076904f in qs_scf::scf (qs_env=0x48dca90, error=...) at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_scf.F:381
#10 0x000000000064f173 in qs_energy::qs_energies_scf (qs_env=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_energy.F:242
#11 0x0000000000650e27 in qs_energy::qs_energies (qs_env=0x48dca90, consistent_energies=Cannot access memory at address 0x0)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_energy.F:126
#12 0x000000000066b37f in qs_force::qs_forces (qs_env=0x48dca90, globenv=0x4855a80, error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_force.F:227
#13 0x0000000000472e0c in force_env_methods::force_env_calc_energy_force (force_env=0x4ccca00, calc_force=<value optimized out>, consistent_energies=<value optimized out>, skip_external_control=<value optimized out>, eval_energy_forces=<value optimized out>, 
    error=...) at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/force_env_methods.F:233
#14 0x00000000004744a5 in force_env_methods::qmmm_energy_and_forces_low (force_env=0x48adc00, calc_force=<value optimized out>, error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/force_env_methods.F:964
#15 0x0000000000474e26 in force_env_methods::qmmm_energy_and_forces (force_env=0x48adb00, calc_force=.TRUE., error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/force_env_methods.F:821
#16 0x00000000004721d6 in force_env_methods::force_env_calc_energy_force (force_env=0x48adb00, calc_force=<value optimized out>, consistent_energies=<value optimized out>, skip_external_control=<value optimized out>, eval_energy_forces=<value optimized out>, 
    error=...) at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/force_env_methods.F:245
#17 0x00000000005805f0 in md_run::qs_mol_dyn_low (md_env=0x4f4e520, md_section=0x47f23c0, motion_section=0x47ee440, force_env=0x48adb00, globenv=0x4855a80, error=..., hmc_ekin=Cannot access memory at address 0x0)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/md_run.F:352
#18 0x00000000005817f6 in md_run::qs_mol_dyn (force_env=0x48adb00, globenv=0x4855a80, averages=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/md_run.F:146
#19 0x000000000040b731 in cp2k_runs::cp2k_run (input_file_name='H2O-', output_unit=6, mpi_comm=<value optimized out>, _input_file_name=<value optimized out>)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k_runs.F:386
#20 0x000000000040ea11 in cp2k_runs::run_input (input_file_path='H2O-', output_file_path='__ST', ierr=0, mpi_comm=<value optimized out>, _input_file_path=1024, _output_file_path=<value optimized out>)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k_runs.F:1133
#21 0x0000000000404c28 in cp2k () at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k.F:285
#22 0x00000000016534da in main ()
#23 0x000000352481ecdd in __libc_start_main () from /lib64/libc.so.6
#24 0x0000000000404719 in _start ()


Additionally, this one failed with abort
tests/QS/regtest-tddfpt

Stack trace:
Core was generated by `/home/rathann/build/BUILD/cp2k-2.3/exe/Linux-x86-64-gfortran/cp2k.sopt H2O_tddf'.
Program terminated with signal 6, Aborted.
#0  0x00000035248328a5 in raise () from /lib64/libc.so.6
(gdb) where
#0  0x00000035248328a5 in raise () from /lib64/libc.so.6
#1  0x0000003524834085 in abort () from /lib64/libc.so.6
#2  0x00000035264c701e in _gfortran_abort () from /usr/lib64/libgfortran.so.3
#3  0x0000000000a3b94b in machine_gfortran::m_abort () at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/machine_gfortran.F:45
#4  0x00000000005a2b81 in message_passing::mp_abort (message=<value optimized out>, _message=0)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/message_passing.F:803
#5  0x00000000008c0efa in termination::stop_program (routinen=<value optimized out>, modulen='cp_fm_diag', line_number=218, error_message='Matrix diagonalization failed', para_env=<value optimized out>, _routinen=<value optimized out>, _modulen=10, _error_message=29)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/termination.F:336
#6  0x0000000000bb47b1 in cp_fm_diag::cp_fm_syevd (matrix=0x523d9f0, eigenvectors=0x523c950, eigenvalues=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp_fm_diag.F:219
#7  0x0000000001158627 in qs_tddfpt_eigensolver::iterative_solver (in_evals=Cannot resolve DW_OP_push_object_address for a missing object)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_tddfpt_eigensolver.F:413
#8  0x0000000001159ebd in qs_tddfpt_eigensolver::eigensolver (p_env=0x50198c0, qs_env=0x4e4adf0, t_env=..., error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_tddfpt_eigensolver.F:109
#9  0x0000000000794e79 in qs_tddfpt_module::tddfpt_calculation (qs_env=0x4e4adf0, error=...)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/qs_tddfpt_module.F:105
#10 0x000000000040bbfa in cp2k_runs::cp2k_run (input_file_name='H2O_', output_unit=6, mpi_comm=<value optimized out>, _input_file_name=<value optimized out>)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k_runs.F:370
#11 0x000000000040ea11 in cp2k_runs::run_input (input_file_path='H2O_', output_file_path='__ST', ierr=0, mpi_comm=<value optimized out>, _input_file_path=1024, _output_file_path=<value optimized out>)
    at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k_runs.F:1133
#12 0x0000000000404c28 in cp2k () at /home/rathann/build/BUILD/cp2k-2.3/makefiles/../src/cp2k.F:285
#13 0x00000000016534da in main ()
#14 0x000000352481ecdd in __libc_start_main () from /lib64/libc.so.6
#15 0x0000000000404719 in _start ()

Regards,
Dominik

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
-------------- next part --------------
diff -up cp2k-2.3/arch/Linux-x86-64-gfortran.sopt.r cp2k-2.3/arch/Linux-x86-64-gfortran.sopt
--- cp2k-2.3/arch/Linux-x86-64-gfortran.sopt.r	2010-12-22 17:46:11.000000000 +0100
+++ cp2k-2.3/arch/Linux-x86-64-gfortran.sopt	2012-12-24 02:20:38.000000000 +0100
@@ -11,9 +11,10 @@ LD       = gfortran
 AR       = ar -r
 
 CPPFLAGS = 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 
-FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS)
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5
+OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
+FCFLAGS  = $(OPTFLAGS) -ffree-form $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) 
-LIBS     = -llapack -lblas -lfftw3
+LIBS     = -llapack -lf77blas -latlas -lfftw3 -lint -lderiv
 
 OBJECTS_ARCHITECTURE = machine_gfortran.o
diff -up cp2k-2.3/makefiles/Makefile.r cp2k-2.3/makefiles/Makefile
--- cp2k-2.3/makefiles/Makefile.r	2012-08-21 13:35:17.000000000 +0200
+++ cp2k-2.3/makefiles/Makefile	2012-12-24 02:20:38.000000000 +0100
@@ -90,11 +90,11 @@ CLEAN_TARGETS = $(addsuffix /clean ,$(VE
 # lists the targets that are not files
 #
 .PHONY : _all libs _progr _lib build clean realclean distclean $(CLEAN_TARGETS)\
-         $(ALL_TARGETS) $(LIB_TARGETS) $(VERSION_TARGETS) fes dirs deptool\
+         $(ALL_TARGETS) $(LIB_TARGETS) $(VERSION_TARGETS) fes dirs\
          dbcsr_test dbcsr_perf mrproper
 
 ### Master rules ###
-build: dirs deptool
+build: dirs
 	+$(MAKE) -C $(SRCDIR) -f $(MAKEFILE) all.dep
 	+$(MAKE) -C $(SRCDIR)/lib -f $(MAKEFILE) lib.dep
 	+$(MAKE) -C $(SRCDIR)/dbcsr_lib -f $(MAKEFILE) dbcsr.dep
@@ -104,7 +104,7 @@ build: dirs deptool
 	+cp $(LIBMA_DEPENDENCIES) $(OBJDIR)/$(VERSION)/libc_ma.dep
 	+$(MAKE) -C $(OBJDIR)/$(VERSION) -f $(MAKEFILE) $(WHAT)
 
-fes: dirs deptool
+fes: dirs
 	+$(MAKE) -C $(TOOLSRC)/metadyn/  -f $(MAKEFILE) fes.dep
 	+$(MAKE) -C $(OBJDIR)/$(VERSION) -f $(MAKEFILE) HACKLIBDEP=yes VERSION=$(VERSION) $(FES) 
 
@@ -124,9 +124,6 @@ pretty: dirs
 	+$(MAKE) -C $(SRCDIR)/dbcsr_lib -f $(MAKEFILE) _pretty_lib3
 	+$(MAKE) -C $(SRCDIR)/arch_lib  -f $(MAKEFILE) _pretty_lib4
 
-deptool: dirs
-	+$(MAKE) LDFLAGS=$(MAKDEPF90_LDFLAGS) -C $(TOOLDIR) -f $(MAKEFILE) makedepf90
-
 libs:
 	+$(MAKE) -f $(MAKEFILE) VERSION=$(VERSION) WHAT=_lib build
 all:
@@ -145,7 +142,7 @@ dbcsr_perf:
 #
 # on a parallel build only one task should go a build the deptool
 #
-$(VERSION_TARGETS): dirs deptool
+$(VERSION_TARGETS): dirs
 	+$(MAKE) -f $(MAKEFILE) VERSION=$@ build
 
 $(CLEAN_TARGETS):
@@ -245,24 +242,24 @@ all.dep: $(OBJECTS:.o=.F) $(LIB1_OBJECTS
 ifeq ($(HACKDEP),yes)
 	echo $^ | awk '{for (i=1;i<=NF;i++) {obj=$$(i) ; sub(".F",".o",obj); if ($$(i)!=obj) print obj,":",$$(i) }}' > $(OBJDIR)/$(VERSION)/all.dep
 else
-	$(TOOLDIR)/makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/all.dep || ( rm -f $(OBJDIR)/$(VERSION)/all.dep  ; exit 1 )
+	makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/all.dep || ( rm -f $(OBJDIR)/$(VERSION)/all.dep  ; exit 1 )
 endif
 
 lib.dep: $(LIB1_OBJECTS:.o=.F)
-	$(TOOLDIR)/makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/lib.dep || ( rm -f $(OBJDIR)/$(VERSION)/lib.dep ; exit 1 )
+	makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/lib.dep || ( rm -f $(OBJDIR)/$(VERSION)/lib.dep ; exit 1 )
 
 fft.dep: $(LIB2_OBJECTS:.o=.F)
-	$(TOOLDIR)/makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/fft.dep || ( rm -f $(OBJDIR)/$(VERSION)/fft.dep ; exit 1 )
+	makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/fft.dep || ( rm -f $(OBJDIR)/$(VERSION)/fft.dep ; exit 1 )
 
 dbcsr.dep: $(LIB3_OBJECTS:.o=.F) $(LIB4_OBJECTS:.o=.F)
-	$(TOOLDIR)/makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/dbcsr.dep || ( rm -f $(OBJDIR)/$(VERSION)/dbcsr.dep ; exit 1 )
+	makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/dbcsr.dep || ( rm -f $(OBJDIR)/$(VERSION)/dbcsr.dep ; exit 1 )
 
 ma.dep: $(LIB4_OBJECTS:.o=.F) machine.F message_passing.F mathlib.F
-	$(TOOLDIR)/makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/ma.dep || ( rm -f $(OBJDIR)/$(VERSION)/ma.dep ; exit 1 )
+	makedepf90 $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/ma.dep || ( rm -f $(OBJDIR)/$(VERSION)/ma.dep ; exit 1 )
 
 # this is kind of a hack, fes depends on files in other directories, hence the -I and the -b.
 fes.dep: $(FESOBJS:.o=.F) 
-	$(TOOLDIR)/makedepf90 -I$(SRCDIR) -b. $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/fes.dep || ( rm -f $(OBJDIR)/$(VERSION)/fes.dep  ; exit 1 )
+	makedepf90 -I$(SRCDIR) -b. $(MODSTRING)  -free $^ > $(OBJDIR)/$(VERSION)/fes.dep || ( rm -f $(OBJDIR)/$(VERSION)/fes.dep  ; exit 1 )
 
 #
 # and the rules doing the actual work
@@ -370,9 +367,6 @@ dbcsr_performance_driver.o: $(LIB3_ARCHI
 #
 # these are tools, but their integration in the build is ugly at least (e.g. see dependencies).
 #
-makedepf90:
-	-test -d $(TOOLDIR)/makedepf90-build || ( mkdir makedepf90-build ; cp $(TOOLSRC)/makedepf90/* makedepf90-build )
-	{ cd makedepf90-build ; ./configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) ; $(MAKE) VERSION="2.8.8cp2k" ; $(MAKE) install ; }
 
 #
 # the rule how to generate the .o from the .F
diff -up cp2k-2.3/tools/do_regtest.r cp2k-2.3/tools/do_regtest
--- cp2k-2.3/tools/do_regtest.r	2012-08-21 10:25:41.000000000 +0200
+++ cp2k-2.3/tools/do_regtest	2012-12-24 16:05:30.000000000 +0100
@@ -103,8 +103,8 @@ leakcheck="NO"
 
 # *** how to execute an input file [ cp2k_prefix input cp2k_postfix ]
 # Leave empty for serial, uncomment for parallel
-cp2k_run_prefix="mpiexec -np 2"
-#cp2k_run_prefix=""
+#cp2k_run_prefix="mpiexec -np 2"
+cp2k_run_prefix=""
 cp2k_run_postfix=
 #cp2k_prefix="( ulimit -t 300; ${dir_base}/${cp2k_dir}/exe/${dir_triplet}/cp2k.${cp2k_version}"
 #cp2k_postfix=" )"
@@ -353,9 +353,6 @@ if [[ ${quick} != "quick" ]]; then
    else
       echo "make realclean VERSION=${cp2k_version} went fine"
    fi
-else
-  echo "quick testing, no realclean"
-fi 
 
 # *** from here failures are likely to be bugs in cp2k
 echo "-------------------------compiling cp2k-----------------------------------"
@@ -372,6 +369,10 @@ else
 compile_warnings=`grep "Warning:" out | wc | tail -1 |  ${awk} '{print $1}'`
 echo "make VERSION=${cp2k_version} went fine (${compile_warnings} warnings)"
 fi
+
+else
+  echo "quick testing, no realclean"
+fi 
 echo "-------------------------regtesting cp2k----------------------------------"
 
 ###################################################################################


More information about the CP2K-user mailing list