g_sas crash on x86_64
I'm running two Debian linux system, one i386 and one x86_64, both with the same version. I installed gromacs 4.0.5-3 (it's basically the 4.0.5). I have to do some solvent accessibility analysis, and I've got a big problem when trying to run one simulation on the x86_64 machine. In fact on the i386 one it goes perfectly, but in the other case g_sas crashes. I tried to compile it with -g flag, and I saw that there's a problem in nsc.c, at line 681. It seems this error is caused by an integer overflow at line 629, because we have:
d = xmax-xmin; nxbox = (int) max(ceil(d/ra2max), 1.);
From gdb I see that:
d = 2.9035636e+32
ra2max = 0.25
d/ra2max = 1.16142544e+33
...but nxbox = -2147483648
Same problem for nybox and nzbox. I don't know how this code works, but the problem should be around here. During the loop that starts at 670 I can see i changing from 0 to -2147483648 when setting to min(i,nxbox-1).
I hope I can help.
Bye and have a good work.
#2 Updated by Berk Hess over 11 years ago
I think I fixed this bug for the git master branch.
I just put the fix in the 4.0 release branch for 4.0.6.
To check that this is what I think:
I assume you have a trilinic box, probably a rhombic dodecahedron?
Does g_sas not crash when you use -nopbc?
If both answers are yes, I fixed the bug and we can close it.