Re: [AMBER] possible bug - SIGSEGV in cpptraj called from MMPBSA.py

From: Stéphane Téletchéa via AMBER <amber.ambermd.org>
Date: Thu, 8 Dec 2022 01:00:54 +0100

Dear all,

Le 06/12/2022 à 11:31, Andrzej Dorobisz via AMBER a écrit :
>
> I checked with GDB that the problem is caused by a negative value of
> the source address in the memcpy call (second arg). Such a value is a
> consequence of an invalid index in the "Selected_" vector of the
> "maskIn" (to which the "atom" iterator points).
>
> First values of "maskIn.Selected_":
> {775042866, 3158064, 2, 3, 4, 5, 6, 7, 8, 9, ...}
>
> So the real question is what could have caused to get such a monster
> here....

I am also encountering strange problems recently with AMBER which seem
related to the input system and MMPBSA.py
(at least in trajectory setup / calculation).

I suspect that there are "recent" changes in compilers behaviour where
previous "tolerated" non initialized variables
and/or automatic type casting have changed. For instance when compiling
with gcc9.4 (Ubuntu 20.04), I see many messages
like this:

amber22_src/AmberTools/src/netcdf-fortran-4.4.4/fortran/nf_dim.f90:107:13:

   107 |     dlen   = cdlen
       |             1
Warning: Possible change of value in conversion from INTEGER(8) to
INTEGER(4) at (1) [-Wconversion]

This is just one example of many messages. Another one from cpptraj subtree:
amber22_src/AmberTools/src/cpptraj/src/tng/xtc2.c:680:47: warning: array
subscript [54, 2147483646] is outside array bounds of ‘int[54]’
[-Warray-bounds]
   680 |           has_large_ints[i*3+j]=has_large_ints[(i+n)*3+j];
       |                                 ~~~~~~~~~~~~~~^~~~~~~~~~~

One reason could be that the cmake option does not sufficiently restrict
fortran version (it seems to be only fortran 90) since during the build
I see messages like this:

amber22_src/AmberTools/src/etc/resp.F:1593:72:

  1593 |   260       IF(V-VF)280,280,90
| 1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)

Since it is a warning it "should" be harmless, but probably leads to
random bugs (like the array subscript indicated above).

I'm not expert enough to be sure how to enforce strict fortran 90 mode,
but if you are and can share the results, I'm interested !

Stéphane

-- 
Assistant Professor, USBB, UMR 6286 CNRS, Bioinformatique Structurale
UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France
Tél : +33 251 125 636 / Fax : +33 251 125 632
http://www.ufip.univ-nantes.fr/  -http://www.steletch.org
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Dec 07 2022 - 16:30:03 PST
Custom Search