[Pw_forum] Bug in QE 6.1 find_mode_sym

Mark Filipiak m.filipiak at epcc.ed.ac.uk
Wed Apr 12 15:10:00 CEST 2017


Hi,

I have installed QE 6.1 with d3q using

make all d3q

Running the Silicon example from d3q (qe-6.1/D3Q/Examples/Silicon) fails in ph.x with a double free error or segmentation violation
error (depending on the compiler).  The run used 4 MPI processes.  The runs failed on

Red Hat Linux 4.8.5 gcc 4.8.5 OpenMPI 1.10.1
Linux 3.10.0-327.36.3.el7.x86_64 gcc 6.2.0 SGI MPT 2.14
Linux 3.10.0-327.36.3.el7.x86_64 Intel 17.0.2 SGI MPT 2.14

The backtrace from the Intel-compiled version is

#0  0x00007fffe8a8a1d7 in raise () from /lib64/libc.so.6
#1  0x00007fffe8a8ba08 in abort () from /lib64/libc.so.6
#2  0x00007fffe8ac9f07 in __libc_message () from /lib64/libc.so.6
#3  0x00007fffe8ad1503 in _int_free () from /lib64/libc.so.6
#4  0x0000000000c51998 in for_dealloc_allocatable ()
#5  0x0000000000464629 in find_mode_sym (u=<error reading variable: Cannot access memory at address 0xc518>,
    w2=<error reading variable: Cannot access memory at address 0xc518>, at=<error reading variable: Cannot access memory at address
0x6>,
    bg=<error reading variable: Cannot access memory at address 0xffffffffffffffff>,
    tau=<error reading variable: Cannot access memory at address 0x0>, nat=0, nsym=48, sr=..., irt=..., xq=..., rtau=..., amass=...,
ntyp=1,
    ityp=..., flag=0, lri=4294967295, lmolecule=.FALSE., nspin_mag=1, name_rap_mode=..., num_rap_mode=...,
.tmp.NAME_RAP_MODE.len_V$b55=15)
    at obsolete.f90:1909
#6  0x0000000000461626 in set_irr (nat=<error reading variable: Cannot access memory at address 0xc518>,
    at=<error reading variable: Cannot access memory at address 0xc518>, bg=<error reading variable: Cannot access memory at address
0x6>,
    xq=<error reading variable: Cannot access memory at address 0xffffffffffffffff>,
    s=<error reading variable: Cannot access memory at address 0x0>, sr=..., tau=..., ntyp=1, ityp=..., ftau=..., invs=..., nsym=48,
rtau=...,
    irt=..., irgq=..., nsymq=48, minus_q=4294967295, irotmq=1, u=..., npert=..., nirr=0, gi=..., gimq=..., iverbosity=0,
u_from_file=.FALSE.,
    eigen=..., search_sym=4294967295, nspin_mag=1, t_rev=..., amass=..., num_rap_mode=..., name_rap_mode=...,
.tmp.NAME_RAP_MODE.len_V$1a2=15)
    at obsolete.f90:336
#7  0x00000000004f3892 in dfile_star::write_dfile_star (descr=<error reading variable: Cannot access memory at address 0xc518>,
source="",
    nsym=<error reading variable: Cannot access memory at address 0x6>,
    xq=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, u=..., nq=0, sxq=..., isq=..., s=..., sr=...,
invs=...,
    irt=..., ntyp=1, ityp=..., dfile_minus_q=.FALSE., iq_=-1, .tmp.SOURCE.len_V$3ea=256) at dfile_star.f90:348
#8  0x00000000004959fe in rotate_dvscf_star (iq_=<error reading variable: Cannot access memory at address 0xc518>) at
rotate_dvscf_star.f90:43
#9  0x000000000040bfe7 in do_phonon (auxdyn=<error reading variable: Cannot access memory at address 0xc518>,
.tmp.AUXDYN.len_V$8=50456)
    at do_phonon.f90:98
#10 0x00000000004063f1 in phonon () at phonon.f90:77
#11 0x000000000040635e in main ()
#12 0x00007fffe8a76b35 in __libc_start_main () from /lib64/libc.so.6
#13 0x0000000000406269 in _start ()

The routines in obsolete.f90 are called.  find_mode_sym() has:

  nmodes=3*nat

  ALLOCATE(rmode(nmodes))

          CALL rotate_mod(z(1,nu_i),rmode,sr(1,1,irot),irt,rtau,xq,nat,irot)

  DEALLOCATE(rmode) <---- this is where the double free error occurs

rotate_mod() is in find_mode_sym.f90 and has:

SUBROUTINE rotate_mod(mode,rmode,sr,irt,rtau,xq,nat,irot)

  COMPLEX(DP) :: rmode(3*nat,3*nat)

  rmode=(0.d0,0.d0)

Modules are not used, so the different array shapes are not detected at compile time.

Attached is a patch for obsolete.f90 but this may introduce other errors.


Mark

Mark Filipiak
EPCC
The University of Edinburgh
James Clerk Maxwell Building
Peter Guthrie Tait Road
Edinburgh
EH9 3FD
UK
Telephone +44 131 651 3467
Fax +44 131 650 6555





-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 507 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20170412/b654cd67/attachment.obj>


More information about the users mailing list