# CUDA Error: 'Freeing of the device buffer failed' in GROMACS Build Test

**URL:** <https://gromacs.bioexcel.eu/t/cuda-error-freeing-of-the-device-buffer-failed-in-gromacs-build-test/8959>\
**Category:** User discussions\
**Created:** [April 23, 2024, 9:21am UTC](https://gromacs.bioexcel.eu/t/cuda-error-freeing-of-the-device-buffer-failed-in-gromacs-build-test/8959 "2024-04-23T09:21:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liangco\_fox](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@Liangco\_fox](https://gromacs.bioexcel.eu/u/Liangco_fox)\
**Post date:** [April 23, 2024, 9:21am UTC](https://gromacs.bioexcel.eu/t/cuda-error-freeing-of-the-device-buffer-failed-in-gromacs-build-test/8959/1 "2024-04-23T09:21:38Z")

</div>

GROMACS version: 2024.1  
GROMACS modification: No  
**System Information:**

- Operating System: Ubuntu 22.04
- CUDA Version: CUDA 12.4
- GPU Driver Version: 550.54.15
- GPU : NVIDIA GeForce RTX 4090
- CPU : 13th Gen Intel(R) Core™ i9-13900K

This my cmake command

```auto
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DGMX_DOUBLE=off

```

After I completed the compilation, I executed the `make test` command and encountered the following error.

```auto
-------------------------------------------------------
Program: nblib-setup-test, version 2024.1
Source file: src/gromacs/gpu_utils/devicebuffer.cuh (line 111)
Function: freeDeviceBuffer<int*>(int**)::<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
-------------------------------------------------------
The following tests FAILED:
          7 - NbLibSetupTests (Failed)
Errors while running CTest
make[3]: *** [CMakeFiles/run-ctest-nophys.dir/build.make:71: CMakeFiles/run-ctest-nophys] Error 8
make[2]: *** [CMakeFiles/Makefile2:3287: CMakeFiles/run-ctest-nophys.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3320: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:628: check] Error 2

```

I have checked the GROMACS run-time errors guide but couldn’t find a specific solution to my

Thank you in advance for your time and help!

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [April 23, 2024, 11:25am UTC](https://gromacs.bioexcel.eu/t/cuda-error-freeing-of-the-device-buffer-failed-in-gromacs-build-test/8959/2 "2024-04-23T11:25:19Z")

</div>

Hi!

[This is an issue in our test suite](https://gitlab.com/gromacs/gromacs/-/issues/4888). It will be fixed in GROMACS 2024.2. For now, you can safely disregard this failing test; it does not indicate any actual problem.
