PTX JIT compilation failed on 5070Ti with GROMACS 2025

GROMACS version: 2025.2
GROMACS modification: No

When trying to launch a simulation on a node with RTX 5070Ti GPU, I get an ‘invalid PTX’ CUDA error:

 1 GPU selected for this run.
Mapping of GPU IDs to the 2 GPU tasks in the 1 rank on this node:
  PP:0,PME:0
PP tasks will do (non-perturbed) short-ranged interactions on the GPU
PP task will update and constrain coordinates on the CPU
PME tasks will do all aspects on the GPU
Using 1 MPI thread
Using 16 OpenMP threads 

starting mdrun 'Protein'
10000 steps,     40.0 ps.

-------------------------------------------------------
Program:     gmx mdrun, version 2025.2-dev-20250512-0eaa03516a
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.

I used CUDA 12.2 for building GROMACS.

Carsten

I used Cuda 12.9 and Gromacs 2025.2 and got the same error. Try adding an explicit gpu architecture when cmake:

-DGMX_CUDA_TARGET_SM='90;100;120' -DGMX_CUDA_TARGET_COMPUTE='90;100;120'

This solved my problem.

Related links:

Were you able to fix it? I’m having the same problem with the 5060.

If you solved it, could you explain what you did? I’m very new to this.

My problem vanished after upgrading from CUDA 12.2 to 12.8 and from GROMACS 2025.2 to 2025.3. I believe the relevant step was the CUDA upgrade to 12.8 which then means that on the 5070Ti you don’t rely on generating code from PTX any more.