[AMBER] A bug in PMEMD which may cause aray (ti_dvdl_values) index out-of-boundary error

From: Ye Mei <ymei4amber.gmail.com>
Date: Fri, 28 May 2021 08:54:46 +0800

Dear AMBER developers,

There is a bug in the PMEMD code, which may cause an out-of-boundary error
for array ti_dvdl_values, when
ifsc = 1,
logdvdl = 1,
barostat = 2,

When logdvdl = 1, array ti_dvdl_values is used to save dV/dL values, which
will be printed out after the simulation. After each step of propagation,
subroutine ti_calc_dvdl was called once in subroutine pme_force.
In subroutine ti_calc_dvdl, the index for ti_dvdl_values increases by 1,
and the value of dV/dL is saved to ti_dvdl_values as

<code>
  if (logdvdl .ne. 0 .and. master) then
      ti_dvdl_pnt = ti_dvdl_pnt + 1
      ti_dvdl_values(ti_dvdl_pnt) = ti_ene(1, si_dvdl)
   end if
</code>

This is fine until subroutine mcbar_trial is called, in which subroutine
pme_force is also called.
Therefore, after every mcbarint (default 100) steps of propagation, there
is one fake dV/dL value saved in array ti_dvdl_values and the index
for ti_dvdl_values increases by another one.

Finally, the out-of-boundary error occurs.

It happens only in the CPU version, but not the GPU version.

Ye
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu May 27 2021 - 18:00:03 PDT
Custom Search