[gmx-users] make_ndx seg fault

Joseph F. Danzer jdanzer at eidogen.com
Tue Aug 19 21:49:01 CEST 2003


I have downloaded gromacs-3.1.4 and compiled it under both RedHat 7.2
and RedHat 7.3. I compiled it with the "--disable-float" option.
On both platforms, I am getting a seg fault while running make_ndx. 

I have a small test case that exposes the problem using crambin,
1crn.pdb.

Here are the steps to generate the problem:

# pdb2gmx_d -f 1crn.pdb -o 1crn.gro -p 1crn.top

I select 0 for the gromacs force field

# editconf_d -f 1crn.gro -o 1crn.gro -d 1.0

#  make_ndx_d -f 1crn.gro -o 1crn.ndx < input_ndx

My input_ndx file looks like:

8 & r 1 2 3 4 5 6 7 8 21 22 23 24 25 26 39 40 41 42 43 44 45 46
name 10 side1c
!10
name 11 side1
8 & r 9 10 11 12 13 14 15 16 31 32 33 34 35 36 37 38
name 12 side2c
!12
name 13 side2
8 & r 17 18 19 20 27 28 29 30
name 14 side3c
!14
name 15 side3
1 & r 1 2 3 4 5 6 7 8 39 40 41 42 43 44 45 46
name 16 main1c
!16
name 17 main1
1 & r 9 10 11 12 13 14 15 16 31 32 33 34 35 36 37 38
name 18 main2c
!18
name 19 main2
1 & r 17 18 19 20 27 28 29 30
name 20 main3c
!20
name 21 main3
name 0 grp0
0&11&0
name 22 grp1
22&13&19
name 23 grp2
23&15&21
name 24 grp3
q


The last few output lines of make_ndx are the following:

Copied index group 0
Copied index group 11
Merged two groups with AND: 409 332 -> 332
Copied index group 0
Merged two groups with AND: 332 409 -> 332
Segmentation fault

I ran this in a debugger, gdb, and got the following stack trace for the
seg fault:

#0  0x403cc1e6 in chunk_free (ar_ptr=0x4047dc80, p=0x8184ac8) at
malloc.c:3242
#1  0x403cc727 in chunk_realloc (ar_ptr=0x4047dc80, oldp=0x8184a60, 
    oldsize=96, nb=104) at malloc.c:3550
#2  0x403cc559 in __libc_realloc (oldmem=0x8184a68, bytes=96) at
malloc.c:3390
#3  0x0805a1a2 in save_realloc (name=0x814536e "block->index", 
    file=0x8145363 "make_ndx.c", line=374, ptr=0x8184a68, size=96)
    at smalloc.c:113
#4  0x0804b11d in copy2block (n=332, index=0x81817f0, block=0x8180cf8)
    at make_ndx.c:374
#5  0x0804d158 in edit_index (atoms=0xbfffe120, x=0x817bb10,
block=0x8180cf8, 
    gn=0xbfffe0b8) at make_ndx.c:848
#6  0x0804d40b in main (argc=1, argv=0xbffff614) at make_ndx.c:913
#7  0x4036b336 in __libc_start_main (main=0x804d1e4 <main>, argc=5, 
    ubp_av=0xbffff614, init=0x8049a54 <_init>, fini=0x81449f0 <_fini>, 
    rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbffff60c)
    at ../sysdeps/generic/libc-start.c:129


Any help would be appreciated,

Joe

-- 
Joseph F. Danzer <jdanzer at eidogen.com>




More information about the gromacs.org_gmx-users mailing list