# Installation with GPU

**URL:** <https://gromacs.bioexcel.eu/t/installation-with-gpu/7890>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [December 19, 2023, 12:04pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890 "2023-12-19T12:04:54Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 19, 2023, 12:04pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/1 "2023-12-19T12:04:54Z")

</div>

**GROMACS version: 2023.3**  
**GROMACS modification: Yes/No**  
**Here post your question**

Im trying to install gromacs with SYCL GPU suport using

$ cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=SYCL -DGMX\_SYCL\_HIPSYCL=on

but I got the error

CMake Error at cmake/gmxManageSYCL.cmake:77 (message):  
HipSYCL build requires Clang compiler, but GNU is used  
Call Stack (most recent call first):  
CMakeLists.txt:667 (include)

and I don’t know how to solve. What am I doing wrong?

---

<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:** [December 19, 2023, 2:15pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/2 "2023-12-19T14:15:45Z")

</div>

Hi!

When compiling GROMACS with hipSYCL, you must set `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` to the same `clang`/`clang++` used in hipSYCL. You can check which one it is by running `syclcc --hipsycl-version | grep default-clang`.

Our [installation guide](https://manual.gromacs.org/current/install-guide/index.html#sycl-gpu-acceleration-for-amd-gpus) recommends using `amdclang` for both hipSYCL and GROMACS, but any recent Clang should work as long as it is the same version.

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 19, 2023, 4:14pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/3 "2023-12-19T16:14:59Z")

</div>

I already have the `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER`, and I have a Intel GPUs using [Intel oneAPI DPC++]. Can’t identify the problem that makes the installation impossible.

---

<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:** [December 19, 2023, 4:28pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/4 "2023-12-19T16:28:27Z")

</div>

> I already have the `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER`

Please, double-check your flags. As you can see in the error message, CMake is using GCC compiler. If you have set the flags earlier, perhaps they were reset, or you had a typo somewhere.

> Intel GPUs using [Intel oneAPI DPC++]

In this case, please set ` -DGMX_SYCL_HIPSYCL=OFF`. GROMACS does not support using hipSYCL/AdaptiveCpp for Intel devices.

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 19, 2023, 4:41pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/5 "2023-12-19T16:41:29Z")

</div>

So how can I install gromacs with GPU acceleration in this case?

---

<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:** [December 20, 2023, 1:52am UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/6 "2023-12-20T01:52:48Z")

</div>

If you have Intel GPU, please follow our installation guide for Intel GPUs: [https://manual.gromacs.org/current/install-guide/index.html#sycl-gpu-acceleration-for-intel-gpus:](https://manual.gromacs.org/current/install-guide/index.html#sycl-gpu-acceleration-for-intel-gpus:)

1. Install oneAPI basekit: [Download the Intel® oneAPI Base Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html). We are recommending oneAPI 2022.3 there, since it’s the most tested. But any newer version should work.
2. Make sure it’s loaded into your current console session, so the compilers etc are properly detected: `source /opt/intel/oneapi/setvars.sh`
3. Configure GROMACS with `cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGMX_GPU=SYCL`. You might have to remove your old `CMakeCache.txt` first.

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 20, 2023, 2:23pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/7 "2023-12-20T14:23:52Z")

</div>

I followed the instructions in the installation guide and it still got errors.  
Don’t know what is going wrong once the C and CXX compilers is already installed.

As follow:

– The C compiler identification is unknown  
– The CXX compiler identification is unknown  
CMake Error at CMakeLists.txt:82 (project):  
The CMAKE\_C\_COMPILER:

```
icx

```

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment  
variable “CC” or the CMake cache entry CMAKE\_C\_COMPILER to the full path to  
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:82 (project):  
The CMAKE\_CXX\_COMPILER:

```
icpx

```

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment  
variable “CXX” or the CMake cache entry CMAKE\_CXX\_COMPILER to the full path  
to the compiler, or to the compiler name if it is in the PATH.

– Configuring incomplete, errors occurred!  
See also “/home/cae/Downloads/gromacs-2023.3/build/CMakeFiles/CMakeOutput.log”.  
See also “/home/cae/Downloads/gromacs-2023.3/build/CMakeFiles/CMakeError.log”.

---

<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:** [December 21, 2023, 3:20pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/8 "2023-12-21T15:20:57Z")

</div>

Does simply running icx or icpx _in the same shell_ works? If yes, try removing CMakeCache.txt and trying again

If not: The Intel compilers, by default, are installed in a non-standard location. Make sure you run `source /opt/intel/oneapi/setvars.sh` in the _same terminal session_ as CMake. Even after the compilers are installed, this sourcing should be done every time you open a new shell (or you can add this command to the end of your .bashrc or the like).

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 21, 2023, 4:00pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/9 "2023-12-21T16:00:17Z")

</div>

Yes, I have run the source for intel oneapi before the comands for gromacs installation in the guide for Intel GPUs like following, and I removed the CMakeCache.txt.

```source

:: initializing oneAPI environment ...
   -bash: BASH_VERSION = 5.1.16(1)-release
   args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

cae@ROBSONSANTOS:~/Downloads/gromacs-2023.3/build$

 Simply running icx or icpx does'nt work, it says no input files

cae@ROBSONSANTOS:~/Downloads/gromacs-2023.3/build$ icx
icx: error: no input files
cae@ROBSONSANTOS:~/Downloads/gromacs-2023.3/build$ icpx
icpx: error: no input files
```

---

<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:** [December 21, 2023, 6:27pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/10 "2023-12-21T18:27:07Z")

</div>

Ok, thanks for checking. Could you please share your CMakeError.log file? You can attach it to the post here or upload to a file-sharing service.

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 21, 2023, 8:21pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/11 "2023-12-21T20:21:44Z")

</div>

Thank you for your attention and support, the requested file is attached to this message.  
[CMakeError.log](https://gromacs.bioexcel.eu/uploads/short-url/5UG9xgmPVn1SYRPDSHtLFyH5tfp.log) (9.3 KB)

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 23, 2023, 11:54am UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/12 "2023-12-23T11:54:35Z")

</div>

I provided the path to the compiler with `sudo cmake … -DCMAKE\_C\_COMPILER=/opt/intel/oneapi/compiler/2024.0/bin/icx -DCMAKE\_CXX\_COMPILER=/opt/intel/oneapi/compiler/2024.0/bin/icpx -DGMX\_GPU=SYCL´ but an error still occurred.

sudo cmake … -DCMAKE\_C\_COMPILER=/opt/intel/oneapi/compiler/2024.0/bin/icx -DCMAKE\_CXX\_COMPILER=/opt/intel/oneapi/compiler/2024.0/bin/icpx -DGMX\_GPU=SYCL

– The C compiler identification is IntelLLVM 2024.0.2  
– The CXX compiler identification is IntelLLVM 2024.0.2  
– Detecting C compiler ABI info  
– Detecting C compiler ABI info - done  
– Check for working C compiler: /opt/intel/oneapi/compiler/2024.0/bin/icx - skipped  
– Detecting C compile features  
– Detecting C compile features - done  
– Detecting CXX compiler ABI info  
– Detecting CXX compiler ABI info - done  
– Check for working CXX compiler: /opt/intel/oneapi/compiler/2024.0/bin/icpx - skipped  
– Detecting CXX compile features  
– Detecting CXX compile features - done  
– Performing Test CXX17\_COMPILES\_SIMPLY  
– Performing Test CXX17\_COMPILES\_SIMPLY - Success  
– Found Python3: /usr/bin/python3.10 (found suitable version “3.10.12”, minimum required is “3.7”) found components: Interpreter Development Development.Module Development.Embed  
– Selected GPU FFT library - MKL  
– Found OpenMP\_C: -fiopenmp  
– Found OpenMP\_CXX: -fiopenmp  
– Found OpenMP: TRUE  
– Performing Test CFLAGS\_WARN\_NO\_MISSING\_FIELD\_INITIALIZERS  
– Performing Test CFLAGS\_WARN\_NO\_MISSING\_FIELD\_INITIALIZERS - Success  
– Performing Test CXXFLAGS\_WARN\_NO\_RESERVED\_IDENTIFIER  
– Performing Test CXXFLAGS\_WARN\_NO\_RESERVED\_IDENTIFIER - Success  
– Performing Test CXXFLAGS\_WARN\_NO\_MISSING\_FIELD\_INITIALIZERS  
– Performing Test CXXFLAGS\_WARN\_NO\_MISSING\_FIELD\_INITIALIZERS - Success  
– Performing Test CXXFLAGS\_NO\_UNROLL\_WARNING  
– Performing Test CXXFLAGS\_NO\_UNROLL\_WARNING - Success  
– Looking for include file unistd.h  
– Looking for include file unistd.h - found  
– Looking for include file pwd.h  
– Looking for include file pwd.h - found  
– Looking for include file dirent.h  
– Looking for include file dirent.h - found  
– Looking for include file time.h  
– Looking for include file time.h - found  
– Looking for include file sys/time.h  
– Looking for include file sys/time.h - found  
– Looking for include file io.h  
– Looking for include file io.h - not found  
– Looking for include file sched.h  
– Looking for include file sched.h - found  
– Looking for include file xmmintrin.h  
– Looking for include file xmmintrin.h - found  
– Looking for gettimeofday  
– Looking for gettimeofday - found  
– Looking for sysconf  
– Looking for sysconf - found  
– Looking for nice  
– Looking for nice - found  
– Looking for fsync  
– Looking for fsync - found  
– Looking for \_fileno  
– Looking for \_fileno - not found  
– Looking for fileno  
– Looking for fileno - found  
– Looking for \_commit  
– Looking for \_commit - not found  
– Looking for sigaction  
– Looking for sigaction - found  
– Performing Test HAVE\_BUILTIN\_CLZ  
– Performing Test HAVE\_BUILTIN\_CLZ - Success  
– Performing Test HAVE\_BUILTIN\_CLZLL  
– Performing Test HAVE\_BUILTIN\_CLZLL - Success  
– Looking for clock\_gettime in rt  
– Looking for clock\_gettime in rt - found  
– Looking for feenableexcept in m  
– Looking for feenableexcept in m - found  
– Looking for fedisableexcept in m  
– Looking for fedisableexcept in m - found  
– Checking for sched.h GNU affinity API  
– Performing Test sched\_affinity\_compile  
– Performing Test sched\_affinity\_compile - Success  
– Looking for include file mm\_malloc.h  
– Looking for include file mm\_malloc.h - found  
– Looking for include file malloc.h  
– Looking for include file malloc.h - found  
– Checking for \_mm\_malloc()  
– Checking for \_mm\_malloc() - supported  
– Looking for posix\_memalign  
– Looking for posix\_memalign - found  
– Looking for memalign  
– Looking for memalign - not found  
– GROMACS is being built without library MPI support (-DGMX\_MPI=no). However MPI is potentially useful for the gmxapi Python API, so we will search for MPI anyway. If this causes problems, disable the check with -DCMAKE\_DISABLE\_FIND\_PACKAGE\_MPI=on.  
– Found MPI\_C: /usr/lib/x86\_64-linux-gnu/openmpi/lib/libmpi.so (found version “3.1”)  
– Found MPI\_CXX: /usr/lib/x86\_64-linux-gnu/openmpi/lib/libmpi\_cxx.so (found version “3.1”)  
– Found MPI: TRUE (found version “3.1”)  
– Using default binary suffix: “”  
– Using default library suffix: “”  
– Looking for pthread.h  
– Looking for pthread.h - found  
– Performing Test CMAKE\_HAVE\_LIBC\_PTHREAD  
– Performing Test CMAKE\_HAVE\_LIBC\_PTHREAD - Success  
– Found Threads: TRUE  
– Looking for C++ include pthread.h  
– Looking for C++ include pthread.h - found  
– Performing Test TEST\_ATOMICS  
– Performing Test TEST\_ATOMICS - Success  
– Atomic operations found  
– Performing Test PTHREAD\_SETAFFINITY  
– Performing Test PTHREAD\_SETAFFINITY - Success  
– Detecting best SIMD instructions for this CPU  
– Checking for GCC x86 inline asm  
– Checking for GCC x86 inline asm - supported  
– Detected build CPU features - aes apic avx avx2 avx512f avx512cd avx512bw avx512vl avx512secondFMA clfsh cmov cx8 cx16 f16c fma htt intel lahf mmx msr nonstop\_tsc pcid pclmuldq pdpe1gb popcnt pse rdrnd rdtscp sha sse2 sse3 sse4.1 sse4.2 ssse3 tdt x2apic  
– Detected build CPU brand - 11th Gen Intel(R) Core™ i5-1135G7 @ 2.40GHz  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED - Success  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_COMPILE\_WORKS  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_COMPILE\_WORKS - Success  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED - Success  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_COMPILE\_WORKS  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_COMPILE\_WORKS - Success  
– This is an Intel CPU with only 1 AVX-512 FMA unit, so AVX2 will be faster.  
– Detected best SIMD instructions for this CPU - AVX2\_256  
– Performing Test C\_mavx2\_mfma\_FLAG\_ACCEPTED  
– Performing Test C\_mavx2\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test C\_mavx2\_mfma\_COMPILE\_WORKS  
– Performing Test C\_mavx2\_mfma\_COMPILE\_WORKS - Success  
– Performing Test CXX\_mavx2\_mfma\_FLAG\_ACCEPTED  
– Performing Test CXX\_mavx2\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test CXX\_mavx2\_mfma\_COMPILE\_WORKS  
– Performing Test CXX\_mavx2\_mfma\_COMPILE\_WORKS - Success  
– Enabling 256-bit AVX2 SIMD instructions using CXX flags: -mavx2 -mfma  
– Performing Test \_Wno\_unused\_command\_line\_argument\_FLAG\_ACCEPTED  
– Performing Test \_Wno\_unused\_command\_line\_argument\_FLAG\_ACCEPTED - Success  
– Performing Test \_callconv\_\_\_vectorcall  
– Performing Test \_callconv\_\_\_vectorcall - Success  
– Checking for flags to enable SYCL  
– Performing Test SYCL\_CXX\_FLAGS\_RESULT  
– Performing Test SYCL\_CXX\_FLAGS\_RESULT - Failed

CMake Error at cmake/gmxManageSYCL.cmake:384 (message):  
Cannot compile a SYCL program with -fsycl. Try a different compiler or  
disable SYCL.  
Call Stack (most recent call first):  
CMakeLists.txt:667 (include)

– Configuring incomplete, errors occurred!

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 26, 2023, 12:57am UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/13 "2023-12-26T00:57:40Z")

</div>

**After many attempts I managed to find a solution. Below I leave a step by step guide, in case anyone faces the same problem to install gromacs with Intel GPU support, since there is no detailed tutorial for this.**

# STEP 1: INSTALL INTEL ONE API BASE TOOLKIT

$ cd ~  
sudo apt-get install libnotify4 xdg-utils libxcb-dri3-0 libgbm1 libnss3 libgtk-3-0 libatspi2.0-0 g++  
sudo apt -y install ncurses-term

$ cd ~/Downloads  
wget [https://registrationcenter-download.intel.com/akdlm/IRC\_NAS/163da6e4-56eb-4948-aba3-debcec61c064/l\_BaseKit\_p\_2024.0.1.46\_offline.sh](https://registrationcenter-download.intel.com/akdlm/IRC_NAS/163da6e4-56eb-4948-aba3-debcec61c064/l_BaseKit_p_2024.0.1.46_offline.sh)  
sudo sh ./l\_BaseKit\_p\_2024.0.1.46\_offline.sh

# STEP 2: GET NEO DRIVER ([Releases · intel/compute-runtime · GitHub](https://github.com/intel/compute-runtime/releases))

$ apt install ocl-icd-libopencl1

$ cd ~/Downloads  
mkdir neo  
cd neo  
wget [https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15136.4/intel-igc-core\_1.0.15136.4\_amd64.deb](https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15136.4/intel-igc-core_1.0.15136.4_amd64.deb)  
wget [https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15136.4/intel-igc-opencl\_1.0.15136.4\_amd64.deb](https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15136.4/intel-igc-opencl_1.0.15136.4_amd64.deb)  
wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-level-zero-gpu-dbgsym\_1.3.27191.9\_amd64.ddeb](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-level-zero-gpu-dbgsym_1.3.27191.9_amd64.ddeb)  
wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-level-zero-gpu\_1.3.27191.9\_amd64.deb](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-level-zero-gpu_1.3.27191.9_amd64.deb)  
wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-opencl-icd-dbgsym\_23.35.27191.9\_amd64.ddeb](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-opencl-icd-dbgsym_23.35.27191.9_amd64.ddeb)  
wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-opencl-icd\_23.35.27191.9\_amd64.deb](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/intel-opencl-icd_23.35.27191.9_amd64.deb)  
wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/libigdgmm12\_22.3.11.ci17747749\_amd64.deb](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/libigdgmm12_22.3.11.ci17747749_amd64.deb)

$ wget [https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/ww35.sum](https://github.com/intel/compute-runtime/releases/download/23.35.27191.9/ww35.sum)  
sha256sum -c ww35.sum

$ sudo dpkg -i \*.deb

# STEP 3: CLONE SYCL FROM SYCL-ACADEMY ON GITHUB

# cd ~/

sudo git clone --recurse-submodules [GitHub - KhronosGroup/syclacademy: SYCL Academy, a set of learning materials for SYCL heterogeneous programming](https://github.com/codeplaysoftware/syclacademy.git)

# STEP 4: GET GROMACS INSTALLATION FILES

$ cd ~/Downloads  
wget ftp://ftp.gromacs.org/gromacs/gromacs-2023.3.tar.gz  
tar xfz gromacs-2023.3.tar.gz  
cd gromacs-2023.3  
mkdir build  
cd build

# STEP 5: COPY THE FILES ‘source.cpp’ AND ‘solucion.cpp’ (FROM Exercise\_01\_Compiling\_with\_SYCL) AND ‘catch2’ (FROM single\_include) TO THE build DIRECTORY FOR GROMACS INSTALLATION

$ cd ~/syclacademy/External/Catch2/single\_include/  
cp -r catch2 ~/Downloads/gromacs-2023.3/build  
cd ~/Downloads/gromacs-2023.3/build  
ls  
cd ~/syclacademy/Code\_Exercises/Exercise\_01\_Compiling\_with\_SYCL  
cp -r source.cpp ~/Downloads/gromacs-2023.3/build  
cd ~/Downloads/gromacs-2023.3/build  
ls

# STEP 6: EDIT THE FILE ‘source.cpp’, WHERE IS \<catch2/catch.hpp\> CHANGE TO “catch2/catch.hpp” AND SAVE

# withou exit the build directory activate the environment of one api using the following comand:

$ source /opt/intel/oneapi/setvars.sh  
icpx -fsycl -I ~/syclacademy/External/Catch2/single\_include -o a.out source.cpp  
ls

# this should create a file called a.out in the build directory

# STEP 7: INSTALL THE REQUIRES

cd ~/  
sudo apt install gcc cmake libpomp-dev hwloc libhwloc-dev  
cd ~/Downloads/gromacs-2023.3/build

# STEP 8: INSTALL GROMACS ON ROOT

sudo su source /opt/intel/oneapi/setvars.sh  
$ cmake .. -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DCMAKE\_C\_COMPILER=icx -DCMAKE\_CXX\_COMPILER=icpx -DGMX\_GPU=SYCL -DGMX\_HWLOC=ON -DCMAKE\_INSTALL\_PREFIX=/opt/gromacs-23  
make -j 8  
make check  
make install

# STEP 9: TO PERFORM GROMAC SIMULATION

1. open the work directory
2. run as root
3. open the intel environment with: $ source /opt/intel/oneapi/setvars.sh
4. activate gromacs with: $ source /opt/gromacs-23/bin/GMXRC

---

<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:** [December 26, 2023, 5:00pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/14 "2023-12-26T17:00:07Z")

</div>

Hi! Were you running `cmake` with `sudo` before? That is not only unnecessary, but, furthermore, `sudo` resets all the environment changes done by `source /opt/intel/oneapi/setvars.sh`, which could explain why compiler could not be found (and, even if you provide the full path, device detection etc can fail later).

As you discovered, one solution is to run `sudo su`, to open a new session and do environment setup and `cmake` from there. But a better way (since running CMake as root is not recommended from security standpoint) would be simply to run `cmake` without `sudo`. Only the last step, `make install`, needs superuser permissions.

---

<div class="post-metadata">

**Author:** ![robsonlourenco](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robsonlourenco](https://gromacs.bioexcel.eu/u/robsonlourenco)\
**Post date:** [December 26, 2023, 5:16pm UTC](https://gromacs.bioexcel.eu/t/installation-with-gpu/7890/15 "2023-12-26T17:16:58Z")

</div>

If I run the installation without root the comand icpx and icx is not found.
