Segfault on ia32/MPI in H2O-hfx-1 testcase

Michael Banck mba... at debian.org
Tue Sep 4 23:41:59 UTC 2012


Hi,

I noticed that on ia32 when using mpiexec (and only then, if I run cp2k.popt
without mpirun or mpiexec, it works fine) to run e.g.
tests/QS/regtest-hfx/H2O-hfx-1.inp, I get a segfault:

 Re-scaling the density matrix to get the right number of electrons
                  # Electrons              Trace(P)
                  # Scaling factor
                           10                10.000
1.000

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

This is the backtrace when I attach gdb to it:

#0  STA (v=..., x=0xc4d0718, ovs=<optimized out>, aligned_like=<optimized out>) at ../../../simd-support/simd-sse2.h:125
#1  n2fv_6 (ri=0xbffc8980, ii=0xbffc8988, ro=0xc4d06e8, io=0xc4d06f0, is=<optimized out>, os=<optimized out>, v=3, ivs=2, ovs=12) at ../common/n2fv_6.c:146
#2  0xb6d5f8ad in dobatch (ego=ego at entry=0xc50c5e0, ri=ri at entry=0xc4d06e8, ii=0xc4d06f0, ro=ro at entry=0xc4d06e8, io=io at entry=0xc4d06f0, buf=buf at entry=0xbffc8980, batchsz=3) at direct.c:51
#3  0xb6d5f9b7 in apply_buf (ego_=0xc50c5e0, ri=0xc4d06e8, ii=<optimized out>, ro=0xc4d06e8, io=0xc4d06f0) at direct.c:87
#4  0xb6d5cb1c in apply_dit (ego_=0xc50c780, ri=ri at entry=0xc4d06e8, ii=ii at entry=0xc4d06f0, ro=ro at entry=0xc4d06e8, io=io at entry=0xc4d06f0) at ct.c:41
#5  0xb6d62403 in apply (ego_=0xc50c800, ri=0xc4d06e8, ii=0xc4d06f0, ro=0xc4d06e8, io=0xc4d06f0) at vrank-geq1.c:62
#6  0xb6d61e9c in apply (ego_=0xc4b0a00, ri=ri at entry=0xc4d06e8, ii=ii at entry=0xc4d06f0, ro=ro at entry=0xc4d06e8, io=io at entry=0xc4d06f0) at rank-geq2.c:48
#7  0xb6d62403 in apply (ego_=0xc4afb40, ri=0xc4d06e8, ii=0xc4d06f0, ro=0xc4d06e8, io=0xc4d06f0) at vrank-geq1.c:62
#8  0xb6d61e9c in apply (ego_=0xc4b2440, ri=0xc4d06e8, ii=0xc4d06f0, ro=0xc4d06e8, io=0xc4d06f0) at rank-geq2.c:48
#9  0xb6e0458c in dfftw_execute_dft_ (p=p at entry=0xc4b389c, in=in at entry=0xc4d06e8, out=out at entry=0xc4d06e8) at f77funcs.h:178
#10 0x09666738 in fftw33d (plan=..., scale=1, zin=..., zout=..., stat=1) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/fft_lib/fftw3_lib.F:196
#11 0x09661b2c in fft_3d (plan=..., scale=1, zin=..., zout=..., stat=1) at fft_lib.f90:135
#12 0x080c77d4 in fft_tools::fft3d_s (fsign=1, n=..., zin=..., zout=..., scale=1, status=<error reading variable: Cannot access memory at address 0x0>, debug=.FALSE.) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/fft_tools.F:441
#13 0x08340b39 in pw_methods::fft_wrap_pw1pw2 (pw1=..., pw2=..., debug=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/pw_methods.F:1462
#14 0x0834ada1 in pw_methods::pw_transfer (pw1=..., pw2=..., debug=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/pw_methods.F:660
#15 0x08eabcd2 in qs_collocate_density::density_rs2pw (pw_env=0xbfc6398, rs_rho=..., rho=..., rho_gspace=..., interp_section=0xbfa4900, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_collocate_density.F:3433
#16 0x08ec0f83 in qs_collocate_density::calculate_rho_elec (matrix_p=0xbfee1d8, rho=..., rho_gspace=..., total_rho=0, qs_env=0xbfe1e58, soft_valid=.TRUE., compute_tau=<error reading variable: Cannot access memory at address 0x0>,
    basis_set_id=<error reading variable: Cannot access memory at address 0x0>, der_type=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_collocate_density.F:1392
#17 0x0849ae3f in qs_rho_methods::qs_rho_update_rho (rho_struct=0xbfee0b0, qs_env=0xbfe1e58, local_rho_set=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_rho_methods.F:391
#18 0x084a1e91 in qs_scf::scf_env_initial_rho_setup (scf_env=0xc400b80, qs_env=0xbfe1e58, scf_section=0xbf9fdd8, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_scf.F:2277
#19 0x084a9f89 in qs_scf::init_scf_run (scf_env=0xc400b80, qs_env=0xbfe1e58, scf_section=0xbf9fdd8, do_xas_tp=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_scf.F:1810
#20 0x084b5408 in qs_scf::scf (qs_env=0xbfe1e58, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_scf.F:368
#21 0x0836fafd in qs_energy::qs_energies_scf (qs_env=0xbfe1e58, consistent_energies=<error reading variable: Cannot access memory at address 0x0>, calc_forces=.TRUE., error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_energy.F:231
#22 0x0837150c in qs_energy::qs_energies (qs_env=0xbfe1e58, consistent_energies=<error reading variable: Cannot access memory at address 0x0>, calc_forces=.TRUE., error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_energy.F:122
#23 0x0838c229 in qs_force::qs_forces (qs_env=0xbfe1e58, globenv=0xbfa2ac0, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/qs_force.F:227
#24 0x080cd877 in force_env_methods::force_env_calc_energy_force (force_env=0xbfc7f40, calc_force=.TRUE., consistent_energies=<error reading variable: Cannot access memory at address 0x0>,
    skip_external_control=<error reading variable: Cannot access memory at address 0x0>, eval_energy_forces=<error reading variable: Cannot access memory at address 0x0>, error=...) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/force_env_methods.F:233
#25 0x0805523a in cp2k_runs::cp2k_run (input_file_name=<error reading variable: Cannot access memory at address 0xbffcebf0>, output_unit=6, mpi_comm=0, _input_file_name=_input_file_name at entry=1024) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/cp2k_runs.F:351
#26 0x08058c1e in cp2k_runs::run_input (input_file_path=<error reading variable: Cannot access memory at address 0xbffcebf0>, output_file_path=<error reading variable: Cannot access memory at address 0xbffceff0>, ierr=0,
    mpi_comm=<error reading variable: Cannot access memory at address 0x0>, _input_file_path=_input_file_path at entry=1024, _output_file_path=_output_file_path at entry=1024) at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/cp2k_runs.F:1143
#27 0x0804e2c6 in cp2k () at /build/cp2k-yMUnXy/cp2k-2.2.426/makefiles/../src/cp2k.F:285
#28 0x0804dde4 in main (argc=2, argv=0xbffd1592) at cp2k.f90:41
#29 0xb60bce16 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
#30 0x0804dead in _start ()

This is my archfile, using gfortran and openmpi:

CC       = mpicc
CPP      = cpp
FC       = mpif90
LD       = gfortran
AR       = ar -r
DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__parallel -D__BLACS -D__SCALAPACK
CPPFLAGS = -C -traditional $(DFLAGS)
FCFLAGS  = -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-none $(DFLAGS)
LDFLAGS  = $(FCFLAGS) 
LIBS     = -llapack -lblas -lfftw3 -lint -lderiv -lmpif90 -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK)
OBJECTS_ARCHITECTURE = machine_gfortran.o

Anybody have a hint what could be the problem?


Many thanks,

Michael



More information about the CP2K-user mailing list