Re: [AMBER] NAB segmentation fault

From: Brian Wolfe <wolfe.br.gmail.com>
Date: Wed, 21 Mar 2012 00:34:19 +0000

Hi all,

I was just setting up and trying to use nab today I just wanted to
note that I came across the same issue and I tracked down where the
segfault was coming from (David Case's new script didn't work for me,
but for other reasons it seems). I just wanted to detail what I saw so
that the developers can fix this. I didn't see anything like it on the
bug patch list, I apologize if I am rehashing trodden ground, but the
reply didn't seem to address this issue.

I got the segfault in conjgrad in sff/conjgrad.c, tracked it using
valgrind to the line
93 *tconjgradOther += t2 - t1;

I tracked back what happened to that variable, and it seems that
init_timers was never called, hence tconjgradOther was undefined at
runtime. I fixed it with the following diff (which I don't recommend,
just showing that it can be fixed relatively easily). I used this just
so I would limit all my changes to one side (either in nab or in sff).

diff -r nab/symbol.c amber11/AmberTools/src/nab/symbol.c
218a219,220
> { "init_timers", T_INT, C_FUNC, K_SCALAR, S_SYSTEM, CC_CC,
> FALSE, FALSE, FALSE, 0, NULL, NULL, NULL, NULL, NULL, 0 },

I then called init_timers in the nab file so the surrounding area looked like

init_timers();
ier = conjgrad( xyz, 4*m.natoms, fret, db_viol, 0.1, 10., 500 );


This seemed to fix the issue. The segfault is gone at least.

Cheers,

Brian

Brian Wolfe

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Mar 20 2012 - 18:00:03 PDT
Custom Search