> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/model-and-simulation/create-oem-controller-code/multi-core-support.md).

# Multi-core Support

As simulation complexity increases, particularly with the integration of multiple real-time controllers and detailed EMT networks, efficient parallel execution becomes essential for maintaining real-time performance. HYPERSIM supports multithreaded execution and high-performance inter-core communication through its modular task management architecture, allowing grid solvers and controller algorithms to be distributed across multiple CPU cores while preserving simulation accuracy and determinism.

This section describes how to **configure task partitioning**, **map execution tasks to CPU cores**, **deploy threaded controllers**, and manage **inter-core communication** in HYPERSIM.

## Configure HYPERSIM Tasks

In HYPERSIM, each simulation model is partitioned into discrete tasks that can be assigned to different CPU cores. A task typically includes:

* A portion of the grid solver (e.g., a section of the EMT network)
* One or more controller blocks, such as UCMs, DLLs, or Simulink-generated models
* Optional logic combined with power circuit.

To support parallelization, HYPERSIM introduces two key mechanisms:

* **Grid partitioning via Constant Parameter (CP) lines**: The power network can be automatically or manually decoupled using CP lines (or other decoupling elements), which serve as artificial boundaries between sub-networks. Each partition can then be assigned to a different core.
* **Controller decoupling via Transceiver blocks**: When transceiver blocks are used to decouple the controller (e.g., DLL or Simulink blocks) from the rest of the model, it runs in a separate task.

This configuration minimizes execution bottlenecks and improves CPU utilization, especially when running large simulations with many black-box controllers.

## Latency Note

Although HYPERSIM strives to present inter-task communication as delay-free from the modeler's perspective, several underlying mechanisms inherently introduce latency that users must account for in timing-sensitive applications:

* **CP lines (Constant Parameter lines)**: CP lines used to decouple portions of the grid model introduce a propagation delay, which is required to isolate the solver partitions. Importantly, this delay must be greater than the simulation timestep to effectively decouple grid solvers.
* **Transceiver blocks**: Used to decouple controllers and simulation domains, transceivers add an additional one time step delay. While this delay is small, it may slightly affect simulation fidelity in fast dynamics or protection schemes.

## Task Manager

HYPERSIM includes an integrated [Task Manager](https://github.com/Opal-RT-Technologies/product-docs-hypersim/tree/release-2026.4/simulation-control-monitoring-and-logging/manage-performance-with-task-manager/README.md), which allows users to view, modify, and optimize the assignment of simulation tasks to CPU cores. The tool simplifies the process of distributing computation across available hardware resources and is accessible through the HYPERSIM GUI.

Key features of the Task Manager include:

* **Automatic task-to-core mapping**: Upon model compilation, HYPERSIM estimates the execution time of each task and assigns them to cores to balance CPU load.
* **User-defined execution time estimates**: The system uses estimated execution time values for each block to optimize task mapping. These values can be manually adjusted by the user for better performance tuning.
* **Manual remapping**: Users can override automatic assignments and manually pin specific tasks to particular cores using the drag-and-drop interface.
* **Monitoring support**: After deployment, execution metrics (such as actual task duration and missed deadlines) can be analyzed using the [RT Monitor](https://github.com/Opal-RT-Technologies/product-docs-hypersim/tree/release-2026.4/simulation-control-monitoring-and-logging/analyze-performance.md) or .simout logs.

This tool is especially useful in multi-controller systems, where controller DLLs and EMT solvers must be balanced across CPU cores to maintain real-time execution.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/model-and-simulation/create-oem-controller-code/multi-core-support.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
