NbnxmSetupTest.CanCreateNbnxmGPU error during 2024 build

GROMACS version: 2024
GROMACS modification: No

While building the 2024 release with CUDA 11.7, I got the following error:

[ RUN ] NbnxmSetupTest.CanCreateNbnxmGPU


Program: nblib-setup-test, version 2024
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.

GROMACS devs: is this an actual bug, or am I doing something wrong?

UPDATE: it seems that I am replicating the problem observed here:
nblib-setup-test failures (#4888)

I’m forced to build with CUDA 11.7 and GCC 11.2 (either this version of CUDA or GROMACS itself does not support GCC 12), and I’ve tried with both AVX2-256 (for running on CPUs+GPUs) and AVX-512 (for running on CPUs only). I get the error in both cases.

Should I shelve this build until 2024.1 comes out?

I think that is a bug, and I experienced the same issue during I installed GROMACS 2024 following the Installation Guide

When I run make check, the terminal reported:

...

-------------------------------------------------------
Program:     nblib-setup-test, version 2024
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
-------------------------------------------------------

...

But it worked well with GROMACS 2023.4 finally.

By the way, the CUDA version is 12.3, and the GCC is 11.4.0.

Identical experience to what is outlined in this note. GROMACS-2024.1 make check experienced single error focused on nblib-setup-test, version 2024.1 Redoing identical installation with GROMACS 2023.4 was successful without any other changes.

This should be fixed in the 2024.2 release (due in a month approximately). Would you be able to see if the tests succeed with Fix crash in NbnxmSetupTest (!4146) · Merge requests · GROMACS / GROMACS · GitLab (commit 1c15c798)?

I would be happy to evaluate and report back.