GROMACS version: 2025.2
GROMACS modification: No
I have got my hands on the new AMD graphic card, 9070XT. I have ubuntu 24.04 with ROCm 6.3.4 installed. I wanted to install gromacs on this system and run some simulations. I have downloaded the 2025.2 version and built with flag GPU=HIP and CMAKE set to the clang within the ROCm directory. The build and install were succesful, but after the installation when I type gmx, it says that it is unable to find libredscale.so. I guess this file is required if I am building gromacs with Adaptivecpp+HIP with SYCL. How do I get gromacs working now?
My gpu architechture is gfx1201.
Hello,
can you please share you cmake command line, and the exact error you are
getting when running?
For reference, in order to build for gfx1201 I would configure and build
like this (for the HIP backend)
cmake .. -DCMAKE_PREFIX_PATH=/opt/rocm
-DCMAKE_HIP_COMPILER=/opt/rocm/bin/amdclang++ -DGMX_GPU=HIP
-DGMX_HIP_TARGET_ARCH=gfx1201
Cheers
Paul
Hi,
For GROMACS 2025, there are two ways to use modern AMD GPUs:
- GMX_GPU=HIP (build instructions); in the mainline GROMACS release, only limited number of tasks can be offloaded to the GPU.
- GMX_GPU=SYCL (build instructions, Ubuntu-specific step-by-step guide); this version is feature-complete.
SYCL/AdaptiveCpp is the recommended approach, but both are supported. Choose whichever suits you best.
Please provide more details on how you build GROMACS and the full error text. libredscale.so
is not something GROMACS itself uses.
Hello @pbauer @al42and.
Thank you for quick response. Please find the attached cmake command
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gromacs-2025.2 -DGMX_GPU=HIP -DCMAKE_HIP_COMPILER=/opt/rocm-6.3.4/llvm/bin/clang -DCMAKE_PREFIX_PATH=/opt/rocm-6.3.4/ -DMGX_SIMD=AVX2_256 -DGMX_USE_RDTSCP=OFF -DCMAKE_BUILD_TYPE=Release -G Ninja
the error that I get when I am running gmx:
gmx: error while loading shared libraries: libredscale.so: cannot open shared object file: No such file or directory
@al42and. I will try to install using adaptivepp/SYCL approach. and get back.
Interesting. What if you run lddtree $(which gmx)
to see where this libredscale is coming from?
Install lddtree
via sudo apt install pax-utils
if necessary
/home/askp/scale-test/gromacs/install/bin/gmx (interpreter => /lib64/ld-linux-x86-64.so.2)
libgromacs.so.9 => /home/askp/scale-test/gromacs/install/lib/libgromacs.so.9
libredscale.so => None
libcufft.so => None
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
libmuparser.so.2 => /home/askp/scale-test/gromacs/install/lib/libmuparser.so.2
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
Are you by any chance trying to do similar to the work here (scale-validation/gromacs at master · spectral-compute/scale-validation · GitHub)?
The HIP build shouldn’t ever link to libcufft, only vkfft or rocfft (and for consumer cards most likely only vkfft).
I have checked out that once before. But they don’t support my GPU architecture “gfx1201”. This build is independent of what they are doing there. I just happened to clone gromacs into a directory that was previously used for their builds. However, the entire build was free of anything that has to do with scale or anything else.
Ok, then you might need to clean the build directory and check that you don’t have any files leftover from the other project.
I have build the same config as you today and don’t see any references to those two libraries
Meanwhile, I actually did a clean-build in a separate directory. This time there was no error by gmx pdb2gmx, gmx grompp and everything. However, when I try to do a mdrun with -gpu_id, the following error is thrown,
:-) GROMACS - gmx mdrun, 2025.2-dev-20250512-0eaa03516a (-:
Executable: /opt/gromacs-2025.2/bin/gmx
Data prefix: /opt/gromacs-2025.2
Working dir: /home/askp/Downloads/for_ASKP-20250528T160757Z-1-001/for_ASKP
Command line:
gmx mdrun -gpu_id
Error occurred while running dummy kernel sanity check on device #0:
, hip error HIP error #98 (hipErrorInvalidDeviceFunction): invalid device function.
-------------------------------------------------------
Program: gmx mdrun, version 2025.2-dev-20250512-0eaa03516a
Source file: src/gromacs/commandline/cmdlineparser.cpp (line 271)
Function: void gmx::CommandLineParser::parse(int*, char**)
Error in user input:
Invalid command-line options
In command-line option -gpu_id
Too few (valid) values
For more information and tips for troubleshooting, please check the GROMACS
website at https://manual.gromacs.org/current/user-guide/run-time-errors.html
Did you add the -DGMX_HIP_TARGET_ARCH=gfx1201 option to CMake? By default it doesn’t build for this architecture.
Also, you need set a valid value to use -gpu_id, e.g. -gpu_id 0
If you are willing to use experimental stuff, the 4947-hip-feature-enablement branch is feature complete for HIP support (and maintained by me, working at AMD). It is based on top of the latest release, currently 2025.2.
Sure! I would try that experiment and get back to you! After all, I am a researcher and experiments are always welcome!!!