Project

General

Profile

Task #2368

update implementation of gmx msd

Added by Mark Abraham almost 2 years ago. Updated 12 months ago.

Status:
In Progress
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

Associated revisions

Revision 0a016ffb (diff)
Added by Kevin Boyd 12 months ago

Add constructor for t_corr in gmx_msd

Moves initialization of t_corr from an init_corr function into
a constructor, keeps all functionality. This is in preparation
to replace c-style arrays within t_corr with stl containers.

A few fields weren't initialized in the original function, added
initialization for them

Made *t_corr into a smart pointer

refs #2368

Change-Id: I37ba12474c5dc3ce989fd1ff369fb50337461750

Revision a2833204 (diff)
Added by Kevin Boyd 9 months ago

Partial conversion of gmx msd to std::vector

Changed raw arrays in the primary struct to vector,
with the exception of Matrix - an STL friendly version
of this is still in the gerrit pipeline

refs #2368

Change-Id: Ic41e6a1f78d53c2d5134e5831536a714b0a38a5b

History

#1 Updated by Kevin Boyd about 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Kevin Boyd
  • Target version set to 2019

#2 Updated by Mark Abraham about 1 year ago

  • Target version changed from 2019 to future

#3 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related DRAFT patchset '2' for Issue #2368.
Uploader: Kevin Boyd ()
Change-Id: gromacs~master~I37ba12474c5dc3ce989fd1ff369fb50337461750
Gerrit URL: https://gerrit.gromacs.org/8612

#4 Updated by Gerrit Code Review Bot 12 months ago

Gerrit received a related patchset '6' for Issue #2368.
Uploader: Kevin Boyd ()
Change-Id: gromacs~master~Ic41e6a1f78d53c2d5134e5831536a714b0a38a5b
Gerrit URL: https://gerrit.gromacs.org/8601

Also available in: Atom PDF