You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Thanks Giovanni,
I will look into it!
I am happy also to discontinue this Action, as we have a much better and simpler method now (EMMIVox.cpp).
I will think a bit about it
Max
On 28 Feb 2024, at 11:32, Giovanni ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Today I noticed this warning with INTEL compiler:
I guess it might be a bug, because using an integer there does not make sense. And the fix would require to replace
abs
withstd::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.
The text was updated successfully, but these errors were encountered: