Files
openairinterface5g/openair1/PHY/TOOLS
Robert Schmidt f8d9c54eff Merge remote-tracking branch 'origin/multipath-testing-ci' into integration_2026_w07 (!3886)
Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline

This MR builds on top of MR !3588 (feat: GPU Accelerated Channel
Simulation Pipeline).

The main portion of the changes is directly taken from MR !3588, and
focuses on integrating the GPU-accelerated channel simulation. On top of
that, this MR adds CI-related configurations to introduce a new channel
simulation testing pipeline into the CI --> RAN-Channel-Simulation

This MR introduces a CUDA-based pipeline to offload the
multipath_channel and add_noise channel simulation functions to the GPU.
This enables large-scale, real-time physical layer simulations not
possible on the CPU.

For full documentation, please see the file at openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md.

System & Compiler Requirements: An NVIDIA GPU with a compatible driver
and the CUDA Toolkit installed.

This feature was developed and tested on the GH200 server using the GCC
12 toolchain. To ensure reproducibility, building with GCC 12 is highly
recommended.  Build Instructions

The primary flag to enable this feature is -DCUDA_ENABLE=ON. The
following command shows a sample configuration used during development
on the GH200 server:

    ./build_oai --phy_simulators --cmake-opt "\
      -DCUDA_ENABLE=ON \
      -DUSE_UNIFIED_MEMORY=ON \
      -DUSE_ATS_MEMORY=OFF \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-12 \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-12 \
      -DENABLE_TESTS=ON"

Memory Model Configuration

The pipeline supports multiple CUDA memory management modes, which can
be configured at compile time. ATS Memory (-DUSE_ATS_MEMORY=ON) is
enabled by default. To use another memory model, you must first disable
ATS.

For a detailed explanation of these models, please refer to Section 3 of
the gpu_acceleration.md report.
2026-02-11 10:21:44 +01:00
..
2026-02-03 10:04:42 +01:00
2022-03-24 14:38:17 +01:00
2025-04-25 14:47:59 +02:00
2025-09-29 09:04:02 +02:00
2017-10-23 12:22:13 +02:00
2023-04-28 16:25:24 +02:00
2018-06-28 14:15:15 +02:00
2025-01-14 10:07:31 +01:00
2021-03-29 21:50:06 +02:00
2025-07-24 13:48:36 +02:00
2022-10-14 09:14:18 +02:00
2017-10-23 12:22:13 +02:00

xForms-based Scope

How to run and troubleshooting

To compile OAI, build with scope support:

./build_oai --build-lib nrscope ...

To use the scope, run the xNB or the UE with option -d. If you receive the error

In fl_initialize() [flresource.c:995]: 5G-gNB-scope: Can't open display :0
In fl_bgn_form() [forms.c:347]: Missing or failed call of fl_initialize()

you can allow root to open X windows:

xhost +si:localuser:root

Usage in gdb with Scope enabled

In gdb, when you break, you can refresh immediately the scope view by calling the display function. The first parameter is the graph context, nevertheless we keep the last value for a dirty call in gdb (so you can use '0')

Example with no variable known

phy_scope_nrUE(0, PHY_vars_UE_g[0][0], 0, 0, 0)

or

phy_scope_gNB(0, phy_vars_gnb, phy_vars_ru, UE_id)

ImScope

ImScope is a scope based on imgui & implot. This scope uses a different concurrency model than xforms scope, with thread safety being priority. The goal is to never show incorrect data on the screen and be able to use the scope with real radios. If correctness cannot be achieved e.g. due to performance issues when using thread safe implementation user should be warned clearly on the screen.

image

Prerequisites

ImScope uses imgui, implot, glfw3 and opengl. imgui and implot should be downloaded automatically when configuring the project with -DENABLE_IMSCOPE=ON, using CPM. CPM is used because imgui and implot do not have an official binary release. glfw3 and opengl should be installed with your system, on ubuntu these are contained in packages libglfw3-dev and libopengl-dev respectivly.

Building

Add -DENABLE_IMSCOPE=ON to your cmake command. Build target imscope

Running

Run with --imscope flag

Usage notes

  • It's experimental and might contain bugs
  • It uses tree nodes to hide/show scopes (layout is subject to change). If a scope is not visible or is frozen it costs nearly nothing in the PHY threads. If its unfrozen every time the data is displayed the PHY thread would have to perform the copy. By default this can happen up to 24 times per second. User is informed on the estimated impact on PHY threads at the top of the window. You can use FPS target to limit the impact on PHY threads and maintain scope functionality while minimizing the effect on realtime operation.

Reporting bugs and feature requests

Report bugs and feature requests on gitlab. There is two demo windows enabled in the scope that showcase imgui/implot, if you find something of interest it can be implemented in the scope.

Recording scope data and reviewing recorded IQ files

It is possible to record scope data from the modems.

  • To record IQ data, run a modem with --imscope-record flag. The recording happens whenever a modem calls dumpScopeData, which currently is done only in gNB on PUSCH DTX and PUSCH CRC NOK. There is a limit of ~1GB of files written by the thread in a single run to avoid accidentally exhausting disk space. If a directory imscope-dump is available the data will be recorded there in .imscope files. Otherwise files are written to the directory the modem was run. This is done so that the directory can be mapped in a docker container.

  • To view recorded IQ files, use the new executable imscope_iq_file_viewer. This can be done by running:

    ./imscope_iq_file_viewer <path_to_iq_file>
    

    Replace <path_to_iq_file> with the path to the IQ file you want to view.