[AMBER-Developers] ndvptx() and type mismatch

From: Ben Roberts <roberts.qtp.ufl.edu>
Date: Thu, 19 Aug 2010 16:07:18 -0400


While on an unrelated bug hunt (segfaults in certain circumstances when building with Intel on the Mac), I tried to compile sander with compiler warnings. When I did so, the compiler crashed out, with a complaint about arguments and parameters not matching.

On inspection, this was related to calls to ndvptx. The seventh parameter of this subroutine (actually an entry point to ndvptr) is an array of integers of passed-in length, but the equivalent argument supplied when ndvptx is called (lines 61 to 62 of printe.f and lines 3387 to 3388 of runmd.f) is the "L95"th element of the xx array, which is _REAL_s.

I tried to trace what was going on and ran into difficulty. Is it safe, though, to mix and match types in this way? Also, it seems that the parameter in question, called "iscrth", is a scratch array, that is set to an array of pointers inside ndvptr (lines 2510 to 2514 of nmr.f). It looks like it might overwrite parts of xx(). Is that the behaviour we want?

Slightly confused,

AMBER-Developers mailing list
Received on Thu Aug 19 2010 - 13:30:03 PDT
Custom Search