Is Intel GPU support available in GROMACS through WSL2 Ubuntu on Windows?

GROMACS version: I think 2023 or latest
GROMACS modification: No

I am using GROMACS on Windows through WSL2. Currently, relying on CPU (i5 12th Gen or i7 8th Gen) power for MD simulations. I read the GROMACS guidelines, and it says I can integrate Intel GPU support through the OneAPI system.

I am a medical researcher, not well-versed in software developments (compiling, integrating, etc). Still, I tried to ChatGPT this issue (since I could not find any video on YouTube or on GROMACS forum. From my experience, I am able to install the OneAPI base-tool kit successfully, I set the envrironment, but when I run the sycl-ls command, it does not detect the GPU…

Initially, after installing the OneAPI base-toolkit, I ran the following commands (as instructed by ChatGPT) to confirm (I don’t know what, lol):

icx --version

Intel(R) oneAPI DPC++/C++ Compiler 2025.2.1 (2025.2.0.20250806) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/intel/oneapi/compiler/2025.2/bin/compiler Configuration file: /opt/intel/oneapi/compiler/2025.2/bin/compiler/../icx.cfg

dpcpp --version

icpx: warning: use of ‘dpcpp’ is deprecated and will be removed in a future release.

Use ‘icpx -fsycl’ [-Wdeprecated] Intel(R) oneAPI DPC++/C++ Compiler 2025.2.1 (2025.2.0.20250806) Target: x86_64-unknown-linux-gnu

Thread model: posix InstalledDir: /opt/intel/oneapi/compiler/2025.2/bin/compiler

Configuration file: /opt/intel/oneapi/compiler/2025.2/bin/compiler/../icpx.cfg

sycl-ls

[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core™ i7-8700 CPU @ 3.20GHz OpenCL 3.0 (Build 0) [2025.20.8.0.06_160000]

According to ChatGPT, the installation was successful, but as you could see, it did not, detect Intel GPU, only CPU is listed (I don’t know if this is relevant, but this PC also had a Radeon 520 GPU, initially, I spent so much time configuring this GPU but failed, I think it is not supported by GROMACS, anyway).

ChatGPT said, there could be two reasons:

#ChatGPT

Right now, your SYCL device list only includes OpenCL CPU, which means:

  • The Intel GPU runtime (level-zero or intel-opencl-icd) isn’t visible or installed in WSL

  • Or, your Windows GPU driver does not yet expose the GPU to WSL

Step 1. Check your Windows side

Run this in PowerShell (Windows, not WSL):

Get-WmiObject Win32_VideoController | Select-Object Name,DriverVersion

I checked this in PowerShell, it was Ok.

#ChatGPT

Step 2. Install GPU runtime inside WSL

In WSL (Ubuntu), run:

sudo apt update
sudo apt install intel-level-zero-gpu intel-opencl-icd clinfo

I ran this in WSL.

sudo apt install intel-level-zero-gpu intel-opencl-icd clinfo

Reading package lists…

Done Building dependency tree…

Done Reading state information…

Done E: Unable to locate package intel-level-zero-gpu

GPT said: “Means your Ubuntu (inside WSL) doesn’t yet have Intel’s GPU runtime repository configured.” It suggested the following solution:

#ChatGPT

Step 1. Add Intel GPU runtime repository

Run these commands inside Ubuntu (WSL):

wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | sudo tee /etc/apt/sources.list.d/intel.gpu.jammy.list
sudo apt update

Step 2. Install Intel GPU runtimes

sudo apt install intel-opencl-icd intel-level-zero-gpu level-zero-dev clinfo


Step 3. Verify GPU detection

sycl-ls

Now, I got this error:

sycl-ls

Segmentation fault (core dumped)

ChatGPT said, there could be two reasons for this error:

“Segmentation fault (core dumped)” from sycl-ls is actually a known symptom when:

  1. The Intel GPU runtime (Level Zero + OpenCL) isn’t fully installed or mismatched with your Ubuntu version, or

  2. You’re on WSL 2 without GPU passthrough enabled yet (so there’s no accessible /dev/dxg device).

I did the 2nd step first, and got this output:

ls /dev/dxg

/dev/dxg

GPT said,

Perfect — that means your Intel GPU is visible to WSL2 via /dev/dxg, so GPU passthrough is active!
We just need to install the proper Level Zero + OpenCL runtimes so the Intel oneAPI stack can actually use the GPU.

Then, it provided an updated code (don’t know what’s the difference):

sudo rm /etc/apt/sources.list.d/intel-graphics.list
echo “deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] ``https://repositories.intel.com/graphics/ubuntu`` jammy main” |
sudo tee /etc/apt/sources.list.d/intel-graphics.list
sudo apt update

But, even after running these modifications, I got the same outout

sycl-ls

Segmentation fault (core dumped)

Now, wondering, what’s the solution, GPT seems to be confused now, or out of options. Want to ask a simple basic question as well, is it even possible to integrate Intel GPUs in this way? Thank you.

Hi,

This is not a GROMACS issue (yet). Asking at Intel forums about getting sycl-ls to work could be more helpful.

But I have some more suggestions for you to try.

What if you try running ONEAPI_DEVICE_SELECTOR=opencl:gpu sycl-ls and ONEAPI_DEVICE_SELECTOR=level_zero:gpu sycl-ls?

If the former works and shows your GPU but the latter crashes, you can try removing intel-level-zero-gpu level-zero-dev.

If both fail, what if you run clinfo -l?

You can also try using GROMACS natively on Windows, without WSL. But here the problem is that Intel dropped support for GPUs prior to Gen 11, so you will first need to find an old-enough version of oneAPI toolking for Windows or play around mixing versions. Probably more trouble than getting it all to work via WSL.