vgapsys / g_lomepro

Local membrane property analysis
GNU Lesser General Public License v3.0
0 stars 2 forks source link

Memory corruption with certain groups in index file #1

Open rsexton2 opened 4 years ago

rsexton2 commented 4 years ago

I am encountering a memory corruption error when trying to run analysis on a group of lipids. The index file has three groups for the membrane (POPE, POPG, POPE+POPG) and all analyses return the memory corruption error when selecting the POPG or POPG+POPE groups, however the analyses work for the POPE group.

I compiled with gromacs 4.6.2 and fftw 3.3.7.

Reading frame 0 time 0.000 *** Error in../opt/g_lomepro/g_lomepro_v1.0.2': free(): invalid next size (normal): 0x0000000000a0a890 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777f5)[0x7f1389c3e7f5] /lib/x86_64-linux-gnu/libc.so.6(+0x8038a)[0x7f1389c4738a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f1389c4b58c] ../opt/g_lomepro/g_lomepro_v1.0.2[0x40e92f] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f1389be7840] ../opt/g_lomepro/g_lomepro_v1.0.2[0x401349] ======= Memory map: ======== 00400000-00427000 r-xp 00000000 00:35 35256648759 /nfs/homes/rsexton/opt/g_lomepro/g_lomepro_v1.0.2 00626000-00627000 r--p 00026000 00:35 35256648759 /nfs/homes/rsexton/opt/g_lomepro/g_lomepro_v1.0.2 00627000-00628000 rw-p 00027000 00:35 35256648759 /nfs/homes/rsexton/opt/g_lomepro/g_lomepro_v1.0.2 009ee000-00a18000 rw-p 00000000 00:00 0 [heap] 7f1380000000-7f1380021000 rw-p 00000000 00:00 0 7f1380021000-7f1384000000 ---p 00000000 00:00 0 7f1386963000-7f1386b0e000 rw-p 00000000 00:00 0 7f1386b0e000-7f1386d8d000 rw-p 00000000 00:00 0 7f1386e19000-7f1387934000 rw-p 00000000 00:00 0 7f1387934000-7f1387972000 r-xp 00000000 08:51 12715666 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f1387972000-7f1387b71000 ---p 0003e000 08:51 12715666 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f1387b71000-7f1387b72000 r--p 0003d000 08:51 12715666 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f1387b72000-7f1387b73000 rw-p 0003e000 08:51 12715666 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f1387b73000-7f1387bb0000 r-xp 00000000 08:51 15467402 /usr/lib/atlas-base/atlas/libblas.so.3.0 7f1387bb0000-7f1387db0000 ---p 0003d000 08:51 15467402 /usr/lib/atlas-base/atlas/libblas.so.3.0 7f1387db0000-7f1387db1000 rw-p 0003d000 08:51 15467402 /usr/lib/atlas-base/atlas/libblas.so.3.0 7f1387db1000-7f1387dc7000 r-xp 00000000 08:51 24510991 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f1387dc7000-7f1387fc6000 ---p 00016000 08:51 24510991 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f1387fc6000-7f1387fc7000 rw-p 00015000 08:51 24510991 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f1387fc7000-7f13880f0000 r-xp 00000000 08:51 12723156 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f13880f0000-7f13882ef000 ---p 00129000 08:51 12723156 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f13882ef000-7f13882f0000 r--p 00128000 08:51 12723156 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f13882f0000-7f13882f2000 rw-p 00129000 08:51 12723156 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f13882f2000-7f1388689000 r-xp 00000000 08:51 15467403 /usr/lib/atlas-base/libatlas.so.3.0 7f1388689000-7f1388889000 ---p 00397000 08:51 15467403 /usr/lib/atlas-base/libatlas.so.3.0 7f1388889000-7f1388890000 rw-p 00397000 08:51 15467403 /usr/lib/atlas-base/libatlas.so.3.0 7f1388890000-7f13888b1000 r-xp 00000000 08:51 15467404 /usr/lib/atlas-base/libcblas.so.3.0 7f13888b1000-7f1388ab1000 ---p 00021000 08:51 15467404 /usr/lib/atlas-base/libcblas.so.3.0 7f1388ab1000-7f1388ab2000 rw-p 00021000 08:51 15467404 /usr/lib/atlas-base/libcblas.so.3.0 7f1388ab2000-7f1388ab5000 r-xp 00000000 08:51 24510799 /lib/x86_64-linux-gnu/libdl-2.23.so 7f1388ab5000-7f1388cb4000 ---p 00003000 08:51 24510799 /lib/x86_64-linux-gnu/libdl-2.23.so 7f1388cb4000-7f1388cb5000 r--p 00002000 08:51 24510799 /lib/x86_64-linux-gnu/libdl-2.23.so 7f1388cb5000-7f1388cb6000 rw-p 00003000 08:51 24510799 /lib/x86_64-linux-gnu/libdl-2.23.so 7f1388cb6000-7f1389295000 r-xp 00000000 08:51 15467401 /usr/lib/atlas-base/atlas/liblapack.so.3.0 7f1389295000-7f1389495000 ---p 005df000 08:51 15467401 /usr/lib/atlas-base/atlas/liblapack.so.3.0 7f1389495000-7f138949a000 rw-p 005df000 08:51 15467401 /usr/lib/atlas-base/atlas/liblapack.so.3.0 7f138949a000-7f13894ba000 r-xp 00000000 08:51 15467399 /usr/lib/atlas-base/libf77blas.so.3.0 7f13894ba000-7f13896b9000 ---p 00020000 08:51 15467399 /usr/lib/atlas-base/libf77blas.so.3.0 7f13896b9000-7f13896ba000 rw-p 0001f000 08:51 15467399 /usr/lib/atlas-base/libf77blas.so.3.0 7f13896ba000-7f13899ac000 r-xp 00000000 00:3c 13373086725 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3f.so.3.5.7 7f13899ac000-7f1389bab000 ---p 002f2000 00:3c 13373086725 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3f.so.3.5.7 7f1389bab000-7f1389bc6000 r--p 002f1000 00:3c 13373086725 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3f.so.3.5.7 7f1389bc6000-7f1389bc7000 rw-p 0030c000 00:3c 13373086725 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3f.so.3.5.7 7f1389bc7000-7f1389d87000 r-xp 00000000 08:51 24510951 /lib/x86_64-linux-gnu/libc-2.23.so 7f1389d87000-7f1389f87000 ---p 001c0000 08:51 24510951 /lib/x86_64-linux-gnu/libc-2.23.so 7f1389f87000-7f1389f8b000 r--p 001c0000 08:51 24510951 /lib/x86_64-linux-gnu/libc-2.23.so 7f1389f8b000-7f1389f8d000 rw-p 001c4000 08:51 24510951 /lib/x86_64-linux-gnu/libc-2.23.so 7f1389f8d000-7f1389f91000 rw-p 00000000 00:00 0 7f1389f91000-7f1389fa9000 r-xp 00000000 08:51 24510959 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f1389fa9000-7f138a1a8000 ---p 00018000 08:51 24510959 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f138a1a8000-7f138a1a9000 r--p 00017000 08:51 24510959 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f138a1a9000-7f138a1aa000 rw-p 00018000 08:51 24510959 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f138a1aa000-7f138a1ae000 rw-p 00000000 00:00 0 7f138a1ae000-7f138a1cf000 r-xp 00000000 08:51 12721565 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 7f138a1cf000-7f138a3ce000 ---p 00021000 08:51 12721565 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 7f138a3ce000-7f138a3cf000 r--p 00020000 08:51 12721565 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 7f138a3cf000-7f138a3d0000 rw-p 00021000 08:51 12721565 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 7f138a3d0000-7f138a68e000 r-xp 00000000 00:3c 13373086729 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3.so.3.5.7 7f138a68e000-7f138a88d000 ---p 002be000 00:3c 13373086729 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3.so.3.5.7 7f138a88d000-7f138a8a8000 r--p 002bd000 00:3c 13373086729 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3.so.3.5.7 7f138a8a8000-7f138a8a9000 rw-p 002d8000 00:3c 13373086729 /nfs/packages/opt/Linux_x86_64/fftw3/3.3.7/gnu-5/lib/libfftw3.so.3.5.7 7f138a8a9000-7f138a9b1000 r-xp 00000000 08:51 24510972 /lib/x86_64-linux-gnu/libm-2.23.so 7f138a9b1000-7f138abb0000 ---p 00108000 08:51 24510972 /lib/x86_64-linux-gnu/libm-2.23.so 7f138abb0000-7f138abb1000 r--p 00107000 08:51 24510972 /lib/x86_64-linux-gnu/libm-2.23.so 7f138abb1000-7f138abb2000 rw-p 00108000 08:51 24510972 /lib/x86_64-linux-gnu/libm-2.23.so 7f138abb2000-7f138b0d2000 r-xp 00000000 00:35 4821786366 /nfs/homes/rsexton/opt/gromacs-4.6.2/lib/libgmx.so.8 7f138b0d2000-7f138b2d1000 ---p 00520000 00:35 4821786366 /nfs/homes/rsexton/opt/gromacs-4.6.2/lib/libgmx.so.8 7f138b2d1000-7f138b2d7000 r--p 0051f000 00:35 4821786366 /nfs/homes/rsexton/opt/gromacs-4.6.2/lib/libgmx.so.8 7f138b2d7000-7f138b2ec000 rw-p 00525000 00:35 4821786366 /nfs/homes/rsexton/opt/gromacs-4.6.2/lib/libgmx.so.8 7f138b2ec000-7f138b2ed000 rw-p 00000000 00:00 0 7f138b2ed000-7f138b313000 r-xp 00000000 08:51 24511084 /lib/x86_64-linux-gnu/ld-2.23.so 7f138b3d4000-7f138b4fb000 rw-p 00000000 00:00 0 7f138b510000-7f138b512000 rw-p 00000000 00:00 0 7f138b512000-7f138b513000 r--p 00025000 08:51 24511084 /lib/x86_64-linux-gnu/ld-2.23.so 7f138b513000-7f138b514000 rw-p 00026000 08:51 24511084 /lib/x86_64-linux-gnu/ld-2.23.so 7f138b514000-7f138b515000 rw-p 00000000 00:00 0 7ffe7669a000-7ffe766bc000 rw-p 00000000 00:00 0 [stack] 7ffe7677b000-7ffe7677e000 r--p 00000000 00:00 0 [vvar] 7ffe7677e000-7ffe76780000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Aborted (core dumped) `

vgapsys commented 4 years ago

I can see two reasons for this to occur:

1) the issue might be in the index group used for POPE+POPG if the selections representing each lipid type contain different number of atoms. g_lomepro expects an index file where POPE and POPG would be represented by equivalent number of atoms. A good choice to test if this is an issue, would be to use only phosphorus atoms (or phosphate group) as a selection to represent every lipid. NOTE: this consideration is only valid for the "master" branch g_lomepro. The "develop" branch version can deal with the different lipid species without the requirement of equivalent atom number.

2) another source of error could be in setting the -lip_num option. It is important to provide in -lip_num the number of lipids that is selected for analysis.

rsexton2 commented 4 years ago

I have compiled the development version and the analyses work for the groups individually with the correct number of lipids provided (POPE 340, POPG 85) but when trying to use the group for all lipids (425 in all) I get another memory corruption error. If I use the group for all lipids but with the wrong lip_num (85 for example) it doesn't crash with an error, but other options (such as lip_num 424) also cause the error.

vgapsys commented 4 years ago

The develop version is not yet well documented, but the command line for two lipid species would require setting the flags as follows: -lipGroup_num 2 -lip_num "340 85" Afterwards, you will be prompted to select lipid group for POPE and later for POPG separately.

This independent lipid selection in the "develop" branch only is supported for the thickness, apl and lipid density calculations so far.