# MKL needed for Gromacs SYCL with DPC++

**URL:** <https://gromacs.bioexcel.eu/t/mkl-needed-for-gromacs-sycl-with-dpc/9716>\
**Category:** User discussions\
**Tags:** cmake-error\
**Created:** [July 23, 2024, 9:18am UTC](https://gromacs.bioexcel.eu/t/mkl-needed-for-gromacs-sycl-with-dpc/9716 "2024-07-23T09:18:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newsky](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@Newsky](https://gromacs.bioexcel.eu/u/Newsky)\
**Post date:** [July 23, 2024, 9:18am UTC](https://gromacs.bioexcel.eu/t/mkl-needed-for-gromacs-sycl-with-dpc/9716/1 "2024-07-23T09:18:51Z")

</div>

GROMACS version: latest  
GROMACS modification: No

Hi,

I’m trying to build Gromacs with SYCL backend. The goal is to run it through PoCL and for this I have custom build of DPC++. When I try to build Gromacs I get error:

```auto
CMake Error at cmake/gmxManageSyclOneApi.cmake:168 (find_library):
  Could not find mkl_sycl_PATH using the following names: mkl_sycl
Call Stack (most recent call first):
  cmake/gmxManageSycl.cmake:49 (include)
  CMakeLists.txt:718 (include)

```

because I don’t have the whole oneAPI installed (and specifically oneMKL).  
I have standalone DPC++ built from [GitHub - intel/llvm: Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.](https://github.com/intel/llvm/).  
If I understood correctly, Gromacs is utilizing MKL for FFTs, is there any way around this?  
I also tried installing MKL separately but then there were version mismatches between DPC++ compiler and MKL.

Any suggestions how to deal with this? I don’t want to install DPC++ with oneAPI because it enforces Intels OpenCL. Should I just try building/installing different versions of DPC++/oneAPI and try to find a match. Intels llvm branch on github does not have release tags so its problematic (at least i did not find it).

Thanks,

Tapio

---

<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 23, 2024, 3:44pm UTC](https://gromacs.bioexcel.eu/t/mkl-needed-for-gromacs-sycl-with-dpc/9716/2 "2024-07-23T15:44:05Z")

</div>

> [@Newsky](#):
>
> If I understood correctly, Gromacs is utilizing MKL for FFTs, is there any way around this?

Yes. You can either build with the [double-batched FFT library](https://manual.gromacs.org/documentation/current/install-guide/index.html#using-double-batched-fft-library) or without a GPU FFT library at all (at the detriment of the overall performance) using `-DGMX_GPU_FFT_LIBRARY=none` option.

> [@Newsky](#):
>
> Intels llvm branch on github does not have release tags so its problematic (at least i did not find it).

They have roughly quarterly releases ([Release oneAPI DPC++ Compiler dependencies · intel/llvm · GitHub](https://github.com/intel/llvm/releases/tag/2024-WW25)), but, as far as I know, there is no exact match between the open-source and the closed-source versions.
