Project

General

Profile

Task #2368

update implementation of gmx msd

Added by Mark Abraham 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
analysis tools
Target version:
-
Difficulty:
uncategorized
Close

Description

In particular, corr_loop() does some strangely constructed vector resizes that can provoke warnings (e.g. with gcc 7.2 on power8):

[566/1386] Building CXX object src/groma...iles/libgromacs.dir/gmxana/gmx_msd.cpp.o
../src/gromacs/gmxana/gmx_msd.cpp: In function ‘int gmx_msd(int, char**)’:
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
                 for (j = maxframes-10; j < maxframes; j++)
                                        ~~^~~~~~~~~~~
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../src/gromacs/gmxana/gmx_msd.cpp:758:42: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]

Some small helper structs and std::vector will make that code a lot more comprehensible to everyone

Also available in: Atom PDF