[AMBER] bug in pmemd/src/cuda/gpu.cpp line 2852?

From: Thomas Zeiser <thomas.zeiser.rrze.uni-erlangen.de>
Date: Mon, 25 Oct 2021 21:47:41 +0200

Dear All,

gcc-11.2.0 fails to compile src/pmemd/src/cuda/gpu.cpp line 2852
with "error: ordered comparison of pointer with integer zero".

That line 2852 also look suspicious:
if (nmrat[i][0] >= 0 && nmrat[i][1] >= 0 && nmrat[i][2] >= 0 && nmrat[3] >= 0) {

"nmrat" is a two-dimensional array. And all other accesses to the
variable in that file are two-dimensions.

Should "nmrat[3]" therefore instead be "nmrat[i][3]"??

If "nmrat[3]" is as expected the comparison operator is not
standard compliant and should be rewritten.

Best regards

Thomas Zeiser
Dr.-Ing. Thomas Zeiser, Head of HPC Systems & Services
Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)
Zentrum für Nationales Hochleistungsrechnen Erlangen (NHR.FAU)
c/o Regionales Rechenzentrum Erlangen (RRZE)
Martensstraße 1, 91058 Erlangen, Germany
https://hpc.fau.de/  &  https://www.rrze.de/
AMBER mailing list
Received on Mon Oct 25 2021 - 13:00:03 PDT
Custom Search