GROMACS version:2025.3-conda_forge
GROMACS modification: Yes/No
Here post your question
Subject: CUDA Error #218 (cudaErrorInvalidPtx) with RTX 5060 when running gmx mdrun
Message:
Hello, I’m trying to run a molecular dynamics simulation using gmx mdrun but keep getting a CUDA error #218 with my new RTX 5060 GPU. The error occurs during the kernel launch and prevents the simulation from starting.
I’m using GROMACS 2025.3 installed via conda-forge with CUDA support. The GPU is detected correctly and the software recognizes it, but fails when trying to compile the PTX kernels. The specific error is: “GPU kernel (k_pruneonly) failed to launch: CUDA error #218 (cudaErrorInvalidPtx): a PTX JIT compilation failed.”
System configuration:
-
GPU: NVIDIA RTX 5060 (Blackwell architecture, compute capability 12.0)
-
GROMACS: 2025.3-conda_forge (nompi_cuda build)
-
CUDA runtime: 12.60, Driver: 13.0
-
Installation:
conda install conda-forge::gromacs=2025.3=nompi_cuda_h7ac747b_0
What I’ve tried:
-
Different GPU flag combinations (
-nb gpu -pme cpu,-nb gpu -pme auto) -
Cleaned CUDA cache (
rm -rf ~/.nv/) -
Verified the GPU works with other CUDA applications
-
The simulation runs fine in CPU-only mode
Specific questions:
-
Has anyone successfully run GROMACS on RTX 5060 or other Blackwell GPUs?
-
Are there known issues with PTX JIT compilation on compute capability 12.0?
-
Should I try manual compilation with specific architecture flags?
-
Are there workarounds like environment variables or specific execution flags?
-
Does the conda-forge build properly support sm_120 architecture?
The full error occurs during the k_pruneonly kernel launch. Any guidance would be greatly appreciated as I need to get this working for my research.
Thank you for your help!
this is the problem:
Program: gmx mdrun, version 2025.3-conda_forge
Source file: src/gromacs/gpu_utils/cudautils.cuh (line 281)
Function: launchGpuKernel<gmx::NBAtomDataGpu, gmx::NBParamGpu, gmx::GpuPairlist, int>(void ()(gmx::NBAtomDataGpu, gmx::NBParamGpu, gmx::GpuPairlist, int), const KernelLaunchConfig&, const DeviceStream&, CommandEvent, const char*, const std::array<void*, 4>&)::<lambda()>
Assertion failed:
Condition: stat == cudaSuccess
GPU kernel (k_pruneonly) failed to launch: CUDA error #218
(cudaErrorInvalidPtx): a PTX JIT compilation failed.