CUDA error while running gromacs

GROMACS version: 2024.4
GROMACS modification: No
GPU: NVIDIA GeForce RTX 4090

Dear all,

While running the ‘nvt’ command (gmx mdrun -deffnm nvt), I get the following error:
Program: gmx mdrun, version 2024.4
Freeing of the device buffer failed. CUDA error #1 (cudaErrorInvalidValue):
invalid argument.

Source file: src/gromacs/gpu_utils/devicebuffer.cuh (line 111)
Function: freeDeviceBuffer<gmx::BasicVector*>(gmx::BasicVector**)::<lambda()>
For more information and tips for troubleshooting, please check the GROMACS
website at Common errors when using GROMACS - GROMACS 2025.1 documentation

MPI rank: 3 (out of 6)

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 Common errors when using GROMACS - GROMACS 2025.1 documentation

I checked the provided URL, but it didn’t have the solution to this problem.

Can someone please help me?
Thanks in advance

A user should never get an assertion failure.

You write 2024.4 for the GROMACS version, but the error says 2025.1. I assume you are using 2025.1. Is that correct?

Are not using any environment variables for extra GROMACS CPU functionality (I guess not)?

Thank you for your response.

The problem has been solved. The issue was with the energy minimization. The input structure was not appropriately minimized, with some atoms having infinite force, and when NVT was applied to this structure, it gave the stated error.