Funnel metadynamics with GROMACS 2024.3-plumed_2.9.3. CUDA error #1 (cudaErrorInvalidValue): invalid

GROMACS version: 2024.3-plumed_2.9.3
GROMACS modification: No

Hi there,

I am trying to use Gromacs 2024.3 with plumed 2.9.3 on a PC with RTX4060 NVIDIA GPU for running a Funnel Metadynamics simulation. Both are compiled without MPI.

Plumed config command:

./configure --enable-modules=all LDFLAGS="-L/usr/local/lib/vmd/plugins/LINUXAMD64/molfile" CPPFLAGS="-I/usr/local/lib/vmd/plugins/include -I/usr/local/lib/vmd/plugins/LINUXAMD64/molfile -I/usr/include" --prefix=/usr/local --disable-gsl --disable-mpi

Gromacs config command:

cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2024 -DOXYGEN_EXECUTABLE=/bin -DGMX_MPI=off -DNVML_INCLUDE_DIR=/usr/local/cuda-12.5/targets/x86_64-linux/include -DNVML_LIBRARY=/usr/local/cuda-12.5/targets/x86_64-linux/lib/stubs/libnvidia-ml.so

My system is minimized, equilibrated in nvt and npt ensembles, and for the production run I use this command gmx mdrun -s md.tpr -deffnm md_fm -v -plumed plumed.dat.

The following error occurs

Program:     gmx mdrun, version 2024.3-plumed_2.9.3
Source file: src/gromacs/gpu_utils/devicebuffer.cuh (line 111)
Function:    freeDeviceBuffer<gmx::BasicVector<float>*>(gmx::BasicVector<float>**)::<lambda()>

Assertion failed:
Condition: stat == cudaSuccess
Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue):
invalid argument.

For more information and tips for troubleshooting, please check the GROMACS
website at https://manual.gromacs.org/current/user-guide/run-time-errors.html

md_fm.log (19.3 KB)

Can anyone help me figure out the problem?

Thanks in advance.

Muhammad

This type of failure

is very typical of PLUMED dying for some reason and killing GROMACS. As such, this is not related to GROMACS.

If PLUMED is failing then the reason is usually reported at the end of the .log file, as is in your case. The reason stated is

ERROR in input to action WHOLEMOLECULES with label @1 : atoms specified using @ symbol but no MOLINFO was available

This is a typical error of missing MOLINFO, that is, you are not telling PLUMED what is the system of reference it should use to understand your references. Take a look at the manual. You can most likely solve this problem simply by adding this line

MOLINFO STRUCTURE=system_reference.pdb

at the beginning of your plumed.dat file and point it to a .pdb that contains your system (you can dump it easily with gmx trjconv).

Thank you. I managed to fix it. Thanks again.