# CMake/AdaptiveCpp Issues with Detecting Working HIP backend?

**URL:** <https://gromacs.bioexcel.eu/t/cmake-adaptivecpp-issues-with-detecting-working-hip-backend/9688>\
**Category:** User discussions\
**Created:** [July 19, 2024, 5:21pm UTC](https://gromacs.bioexcel.eu/t/cmake-adaptivecpp-issues-with-detecting-working-hip-backend/9688 "2024-07-19T17:21:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mick](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mick](https://gromacs.bioexcel.eu/u/mick)\
**Post date:** [July 19, 2024, 5:21pm UTC](https://gromacs.bioexcel.eu/t/cmake-adaptivecpp-issues-with-detecting-working-hip-backend/9688/1 "2024-07-19T17:21:37Z")

</div>

GROMACS version: 2024.2; AdaptiveCpp version: Latest from github (as of 7-19-2024)  
GROMACS modification: No

I’ve recently been using gromacs 2023.4 and gromacs 2024.2 on an HPC system with AMD gpus (M210 and M250); however, after a recent software stack update my latest builds using AdaptiveCpp 0.9.4 weren’t working properly so I decided to take the opportunity to update my builds to the latest version of AdaptiveCpp and use a more up-to-date ROCM (previously I was using ROCM 5.3.0, I am now targeting 5.7.1).

Building AdaptiveCpp seems to go just fine, however, when I try to build gromacs I end up with the following error:

[code] Cmake error:  
– Checking for valid AdaptiveCpp/hipSYCL compiler  
– Checking for valid AdaptiveCpp/hipSYCL compiler - Success  
– Checking for AdaptiveCpp/hipSYCL CUDA target  
– Checking for AdaptiveCpp/hipSYCL CUDA target - Disabled  
– Checking for AdaptiveCpp/hipSYCL HIP target  
– Checking for AdaptiveCpp/hipSYCL HIP target - Disabled  
– Checking for AdaptiveCpp/hipSYCL LevelZero target  
– Checking for AdaptiveCpp/hipSYCL LevelZero target - Disabled  
– Checking for AdaptiveCpp/hipSYCL generic target  
– Checking for AdaptiveCpp/hipSYCL generic target - Disabled  
CMake Warning at cmake/gmxManageSyclAdaptiveCpp.cmake:197 (message):  
AdaptiveCpp/hipSYCL has no GPU targets set! Please, specify target hardware  
with -DHIPSYCL\_TARGETS CMake option  
Call Stack (most recent call first):  
cmake/gmxManageSycl.cmake:45 (include)  
CMakeLists.txt:704 (include)  
[\code]

Below are is my AdaptiveCpp build settings, the top of my acpp-info command, and my gromacs cmake input.

AdaptiveCpp:  
(Note using boost 1.84)  
git clone git clone “https:// github . com/AdaptiveCpp/AdaptiveCpp” \<–note extra spaces were added just for this forum post  
cd AdaptiveCpp  
mkdir build && cd build  
cmake -DWITH\_ACCCELERATED\_CPU=OFF -DWITH\_SSCP\_COMPILER=OFF -DAMDDeviceLib\_DIR=/opt/rocm-5.7.1/lib/cmake/AMDDeviceLibs  
-DAMDGPU\_TARGETS=‘hip:gfx90a,gfx906,gfx908’ -DCLANG\_EXECUTABLE\_PATH=/opt/rocm-5.7.1/llvm/bin/clang++ -DHIP\_DIR=/opt/rocm-5.7.1/lib/cmake/hip -DWITH\_ROCM\_BACKEND=ON  
-DCMAKE\_INSTALL\_PREFIX=‘/home/m/AdaptiveCpp\_new/’

acpp-info output (note my head-node, where I am compiling, has an MI210 but my compute node has an MI250x)

=================Backend information===================  
Loaded backend 0: HIP  
Found device: AMD Instinct MI210  
Loaded backend 1: OpenMP  
Found device: hipSYCL OpenMP host device

=================Device information===================  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Devices for backend HIP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Device 0:  
General device information:  
Name: AMD Instinct MI210  
Backend: HIP  
Vendor: AMD  
Arch: gfx90a:sramecc+:xnack-  
Driver version: 50731921  
Is CPU: 0  
Is GPU: 1

Gromacs:

cmake -DGMX\_MPI=on -DGMX\_GPU=SYCL -DGMX\_SYCL=ACPP -DCMAKE\_INSTALL\_PREFIX=/lustre/orion/proj-shared/bie122/gromacs2024.2-7\_17 -DGMX\_HEFFTE=ON -DCMAKE\_C\_COMPILER=/opt/rocm-5.7.1/llvm/bin/clang -DCMAKE\_CXX\_COMPILER=/opt/rocm-5.7.1/llvm/bin/clang++ -DHIPSYCL\_TARGETS=‘hip:gfx90a,gfx908,gfx906’ -Dadaptivecpp\_DIR=‘/home/m/AdaptiveCpp/lib/cmake/AdaptiveCpp/’ -Dhipsycl\_DIR=‘/home/m/AdaptiveCpp/lib/cmake/hipSycl/’ -DACPP\_ROCM\_PATH=/opt/rocm-5.7.1/ -DGMX\_USE\_HEFFTE=ON -DGMX\_GPU\_FFT\_LIBRARY=‘rocFFT’

I’ve tried several re-builds of AdaptiveCpp with slight variations, but I consistently find that I acpp-info reports the HIP backend being present, but gromacs can’t seem to find it. Any suggestions?

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [July 19, 2024, 8:52pm UTC](https://gromacs.bioexcel.eu/t/cmake-adaptivecpp-issues-with-detecting-working-hip-backend/9688/2 "2024-07-19T20:52:56Z")

</div>

Hi!

I see that you’re using ACpp’s `develop` branch. I suggest using AdaptiveCpp 23.04 or 24.02 releases for now.

Recently (a couple weeks ago), AdaptiveCpp renamed some of their compile-time definitions. That would be addressed in the upcoming GROMACS 2024.3, but it cannot be solved in the releases predating the change.
