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
kazan
August 29, 2025, 3:46pm
2
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:
opened 05:19PM - 24 Aug 20 UTC
closed 07:52PM - 06 Oct 20 UTC
build-error
Omitting a lot, as I believe nvcc from cuda-11.x simply will not generate comput… e_30 code, thus the error message.
See http://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
Default solution is to just remove compute_30. More complex would be to allow different CUDA versions and adjust the generated code to match.
### Steps to reproduce the issue
```console
$ spack install gromacs +cuda
474 /gpfs/packages/spack/spack/opt/spack/linux-rhel7-broadwell/gcc-8.2.0/cuda-11.0.2-tlog2jv6ze6lfxk47omkfabtz7474gbw/bin/nvcc -M -D__CUDACC__ /tmp/swmgr/s
pack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-src/src/gromacs/nbnxm/cuda/nbnxm_cuda.cu -o /tmp/swmgr/spack-stage/spack-s
tage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-build/src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/libgromacs_generated_nbnxm_cuda.cu.o.
NVCC-depend -ccbin /gpfs/packages/spack/spack/opt/spack/linux-rhel7-x86_64/gcc-7.3.0/gcc-8.2.0-kot2sql3i2pckkfopvmxdmbdopuwy42t/bin/g++ -m64 -Dlibgroma
cs_EXPORTS -DHAVE_CONFIG_H -DGMX_DOUBLE=0 -DUSE_STD_INTTYPES_H -Xcompiler ,\"-mavx2\",\"-mfma\",\"-pthread\",\"-fPIC\",\"-O2\",\"-g\",\"-DNDEBUG\",\"-f
excess-precision=fast\",\"-funroll-all-loops\" -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm
_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -ge
ncode arch=compute_70,code=sm_70 -gencode arch=compute_35,code=compute_35 -gencode arch=compute_50,code=compute_50 -gencode arch=compute_52,code=comput
e_52 -gencode arch=compute_60,code=compute_60 -gencode arch=compute_61,code=compute_61 -gencode arch=compute_70,code=compute_70 -gencode arch=compute_7
5,code=compute_75 -use_fast_math -DNVCC -I/gpfs/packages/spack/spack/opt/spack/linux-rhel7-broadwell/gcc-8.2.0/cuda-11.0.2-tlog2jv6ze6lfxk47omkfabtz747
4gbw/include -I/tmp/swmgr/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-src/src/external/thread_mpi/include -I/tmp/swmg
r/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-build/src -I/tmp/swmgr/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7
untnzai2yrdnef7nklow2mc/spack-src/src -I/gpfs/packages/spack/spack/opt/spack/linux-rhel7-broadwell/gcc-8.2.0/openmpi-3.1.6-tg6m4mmn2p3vxbdpopsqgfesihlm
3g5f/include -I/gpfs/packages/spack/spack/opt/spack/linux-rhel7-broadwell/gcc-8.2.0/hwloc-1.11.11-s54td4k4foxz3kdukoesox46risjltch/include -I/usr/inclu
de -I/tmp/swmgr/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-src/src/external -I/tmp/swmgr/spack-stage/spack-stage-gro
macs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-src/src/external/tng_io/include -I/tmp/swmgr/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai
2yrdnef7nklow2mc/spack-build/tng/include -I/tmp/swmgr/spack-stage/spack-stage-gromacs-2020.3-2lg7rupv7untnzai2yrdnef7nklow2mc/spack-src/src/external/lm
fit
475 nvcc fatal : Unsupported gpu architecture 'compute_30'
```
### Information on your system
### Additional information
* [spack-build-out.txt]()
* [spack-build-env.txt]()
### General information
- [ ] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [ ] I have run `spack maintainers <name-of-the-package>` and @mentioned any maintainers
- [ ] I have uploaded the build log and environment files
- [ ] I have searched the issues of this repo and believe this is not a duplicate
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.
Carsten
September 30, 2025, 2:07pm
4
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.