Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in EMMI #1032

Open
GiovanniBussi opened this issue Feb 28, 2024 · 1 comment
Open

Possible bug in EMMI #1032

GiovanniBussi opened this issue Feb 28, 2024 · 1 comment
Assignees

Comments

@GiovanniBussi
Copy link
Member

Today I noticed this warning with INTEL compiler:

EMMI.cpp:1392:22: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
  ene += std::log( abs ( s * ovmd_ave_[i] - ovdd_[i] ) );
           ^
EMMI.cpp:1392:22: note: use function 'std::abs' instead
  ene += std::log( abs ( s * ovmd_ave_[i] - ovdd_[i] ) );

I guess it might be a bug, because using an integer there does not make sense. And the fix would require to replace abs with std::abs.

@maxbonomi can you double check?

In case, the line is there also in plumed v2.8, so I would backport the fix. Notice that the function is not covered in tests, so this would not affect regtests.

@maxbonomi
Copy link
Member

maxbonomi commented Feb 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants