Project

General

Profile

Bug #30

g_anaeig

Added by Jens Krüger about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Erik Lindahl
Category:
analysis tools
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

We tried to make a standard PCA using CVS 3.3.99_20050909 on a 64-bit linux box
(cluster front end). g_covar runs smooth, but when we try to use whatever
function of g_anaeig, it crashes with a memory failure (see below). With 3.2.1
on the same system or with CVS 3.3.99_20050909 on a 32bit machine no error
occurs.

We assume that it is a 32bit 64bit thing. Maybe somwhere in the code a fixed
32bit pointer length had been used?

Greetings,

Jens Krüger


paderborn.de:/scratch/mercutio/AChE/3.3/series01/1DX6/BOTH/covar$ /opt/pc2/grom
acs-3.3/bin/g_anaeig first 1 -last 1 -extr extreme_vec_01.pdb -nframes 25
:
) G R O M A C S (-:

GRoups of Organic Molecules in ACtion for Science
:-)  VERSION 3.3.99_20050909  (-:
Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2004, The GROMACS development team,
check out http://www.gromacs.org for more information.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
:-)  /opt/pc2/gromacs-3.3/bin/g_anaeig  (-:

Option Filename Type Description
------------------------------------------------------------
-v eigenvec.trr Input Full precision trajectory: trr trj
-v2 eigenvec2.trr Input, Opt. Full precision trajectory: trr trj
-f traj.xtc Input, Opt. Generic trajectory: xtc trr trj gro g96 pdb
-s topol.tpr Input, Opt. Structure+mass(db): tpr tpb tpa gro g96 pdb
xml
-n index.ndx Input, Opt. Index file
-eig eigenval.xvg Input, Opt. xvgr/xmgr file
-eig2 eigenval2.xvg Input, Opt. xvgr/xmgr file
-comp eigcomp.xvg Output, Opt. xvgr/xmgr file
-rmsf eigrmsf.xvg Output, Opt. xvgr/xmgr file
-proj proj.xvg Output, Opt. xvgr/xmgr file
-2d 2dproj.xvg Output, Opt. xvgr/xmgr file
-3d 3dproj.pdb Output, Opt. Generic structure: gro g96 pdb xml
-filt filtered.xtc Output, Opt. Generic trajectory: xtc trr trj gro g96 pdb
-extr extreme_vec_01.pdb Output, Opt! Generic trajectory: xtc trr trj gro
g96 pdb
-over overlap.xvg Output, Opt. xvgr/xmgr file
-inpr inprod.xpm Output, Opt. X PixMap compatible matrix file

Option   Type  Value  Description
------------------------------------------------------
-[no]h bool no Print help info and quit
-[no]X bool no Use dialog box GUI to edit command line options
-nice int 19 Set the nicelevel
-b time 0 First frame (ps) to read from trajectory
-e time 0 Last frame (ps) to read from trajectory
-dt time 0 Only use frame when t MOD dt = first time (ps)
-tu enum ps Time unit: ps, fs, ns, us, ms, s, m or h
-[no]w bool no View output xvg, xpm, eps and pdb files
-[no]xvgr bool yes Add specific codes (legends etc.) in the output
xvg files for the xmgrace program
-first int 1 First eigenvector for analysis (-1 is select)
-last int 1 Last eigenvector for analysis (-1 is till the
last)
-skip int 1 Only analyse every nr-th frame
-max real 0 Maximum for projection of the eigenvector on the
average structure, max=0 gives the extremes
-nframes int 25 Number of frames for the extremes output
-[no]split bool no Split eigenvector projections where time is zero
trn version: GMX_trn_file (single precision)
Read non mass weighted reference structure with 528 atoms from eigenvec.trr
Read non mass weighted average/minimum structure with 528 atoms from
eigenvec.trr
  • glibc detected * realloc(): invalid pointer: 0x00000000004006e8 *
    zsh: abort /opt/pc2/gromacs-3.3/bin/g_anaeig -first 1 -last 1 -extr
    extreme_vec_01.pdb

History

#1 Updated by Tyler Luchko over 13 years ago

I have come across what I believe is the same bug using GROMACS 3.3 on my Mac
dual 2.7 GHz G5 running OS 10.4.5. I have seen the same thing on a quad G5 mac
as well. These are both 64 bit machines but I have also tried it on a AMD
Opteron box, which is also 64 bit, and have experieced no problems. The error
message I got was:

Read mass weighted average/minimum structure with 247 atoms from 0/pca/eigenvec.
trj
g_anaeig(644) malloc: * error for object 0x8fe5e718: pointer being reallocated
was not allocated
g_anaeig(644) malloc: *
set a breakpoint in szone_error to debug
-------------------------------------------------------
Program g_anaeig, VERSION 3.3
Source code file: smalloc.c, line: 137

Fatal error:
realloc for *eigval (40 bytes, file eigio.c, line 118, *eigval=0x0x8fe5e718)
-------------------------------------------------------

I looked at the code and I have found a solution to the problem, at least to the
one that I was experiencing. The solution is a one line fix. Line 779 of
gmx_anaeig.c was

real       *eigval1,*eigval2;

and should be

real       *eigval1=NULL,*eigval2=NULL;

Tyler

#2 Updated by Erik Lindahl over 13 years ago

Fixed, according to the suggestion.

Also available in: Atom PDF