Error clearing the GPU buffer when using plumed

GROMACS version: 2023.3
GROMACS modification: Yes (plumed-2.10-dev)

Dear all,

I have posted this in the plumed mailing list too, as I’m not sure on what end the problem is. I recently found a library that may be useful to (somewhat) easily port certain operations to the GPU . The library is called Bandicoot (Bandicoot download | SourceForge.net) and it does work more or less straight out of the box (need to make sure you link it properly which I’m still getting my head round to).

I have managed to offload an expensive matrix operation (using a custom CV) using this library and it does run with plumed driver, but the problem comes when I try to run it on Gromacs. The CV is initialised properly, but before it goes onto the calculator, gromacs crashes with the following error. If anybody has any idea how to fix that (and I do realise that’s untested stuff so no problem if not), I will really appreciate it.

‘’‘’
Program: gmx mdrun, version 2023.3-plumed_2.10.0_dev
Source file: src/gromacs/gpu_utils/devicebuffer.cuh (line 294)
Function: clearDeviceBufferAsync<gmx::BasicVector >(gmx::BasicVector**, size_t, size_t, const DeviceStream&)::<lambda()>

Assertion failed:
Condition: stat == cudaSuccess
Couldn’t clear the device buffer. CUDA error #1 (cudaErrorInvalidValue):
invalid argument.
‘’‘’

Thanks a lot,
Joan