---
page_id: wsd-running-drc-in-parallel-60b23ed7
type: context-page
schema_version: 1
template_id: discord-page
template_version: template-0.1.0
title: "Thread: Running DRC in parallel"
slug: wsd-running-drc-in-parallel-60b23ed7
route: /evidence/designing/project-template/threads/running-drc-in-parallel
section: reference
access: public
summary: 7 Discord messages from 📐 - Designing/📝-project-template/threads/running-drc-in-parallel.md.
status: published
asset_base: .
home_href: /
md_url: /evidence/designing/project-template/threads/running-drc-in-parallel.md
toc_enabled: true
talk_enabled: false
agent_view_enabled: true
copy_buttons_enabled: true
footer_enabled: true
search_indexed: true
tags: [discord, wafer-space, archive]
last_updated: 2026-08-19
talk_url: /evidence/designing/project-template/threads/running-drc-in-parallel.talk.md
talk_route: /evidence/designing/project-template/threads/running-drc-in-parallel/talk
---

# Thread: Running DRC in parallel

Category: **📐 - Designing**
Parent channel: **#📝-project-template**
Thread ID: `1445300879862403164`

Messages: **7**

## message-1445304279584739429

**2025-12-02T06:43:12.708+00:00 — urish**

- Message ID: `1445304279584739429`
- Author ID: `732347216412278825`
- Nickname: urish
- User name: urish
- Type: `21`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445304279584739429
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Reply/reference**
- https://discord.com/channels/1361349522684510449/1423348662318272592/1445300879862403164
<details>
<summary>Reference data</summary>

```json
{
  "channelId": "1423348662318272592",
  "guildId": "1361349522684510449",
  "messageId": "1445300879862403164"
}
```

</details>

**Content**

```text

```

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {
    "mentions": [
      {
        "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
        "color": null,
        "discriminator": "0000",
        "id": "384390069412429834",
        "isBot": false,
        "name": "polyfractal",
        "nickname": "BreakingTaps",
        "roles": []
      }
    ]
  }
}
```

</details>

---

## message-1445304282638454847

**2025-12-02T06:43:13.436+00:00 — urish**

- Message ID: `1445304282638454847`
- Author ID: `732347216412278825`
- Nickname: urish
- User name: urish
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445304282638454847
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
Last time I asked Leo about it, his main concern was the memory requirements
```

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
```

</details>

---

## message-1445304528537911448

**2025-12-02T06:44:12.063+00:00 — BreakingTaps (@polyfractal)**

- Message ID: `1445304528537911448`
- Author ID: `384390069412429834`
- Nickname: BreakingTaps
- User name: polyfractal
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445304528537911448
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
ah, yeah that's fair as a default. would be nice to have the option though (I rented a beefy dedicated server for building/checks this month)
```

**Reactions**

- Resolved media URL: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12_media/1f44d-27259.svg
- Resolved media URL: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png
<details>
<summary>Reactions data</summary>

```json
[
  {
    "count": 1,
    "emoji": {
      "code": "thumbsup",
      "id": "",
      "imageUrl": "2025-12_media/1f44d-27259.svg",
      "isAnimated": false,
      "name": "👍"
    },
    "users": [
      {
        "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png",
        "color": null,
        "discriminator": "0000",
        "id": "732347216412278825",
        "isBot": false,
        "name": "urish",
        "nickname": "urish"
      }
    ]
  }
]
```

</details>

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
    "discriminator": "0000",
    "isBot": false
  },
  "message": {}
}
```

</details>

---

## message-1445304688714190878

**2025-12-02T06:44:50.252+00:00 — urish**

- Message ID: `1445304688714190878`
- Author ID: `732347216412278825`
- Nickname: urish
- User name: urish
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445304688714190878
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
Agreed
```

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
```

</details>

---

## message-1445333512269070365

**2025-12-02T08:39:22.323+00:00 — Leo Moser (mole99) (@mole99)**

- Message ID: `1445333512269070365`
- Author ID: `323371864074485771`
- Nickname: Leo Moser (mole99)
- User name: mole99
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445333512269070365
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
KLayout can run DRC in three different modes: flat, deep and tiled.
Tiled is inherently multithreaded, and I believe deep is multithreaded in some parts.
However, not all modes work equally. While deep is mostly compatible with flat, tiled mode needs careful considerations in the DRC rules.

Why can't separate DRC operations be multithreaded?
KLayout executes the DRC deck interactively, meaning one operation runs after another. This allows easy branching on calculated results, however, it does not allow operations to be parallelized, since dependencies are unknown.
KLayout would need a flow graph based model to do that.

A quick and dirty way to add parallelization would be to manually split the rule deck and start n processes of KLayout.
This is what the `run_drc.py` script does, and I can integrate it into LibreLane for the second run.
However, this also means n times the memory consumption.

I think most of these issues also apply to magic. There the default DRC mode is also a kind of deep mode based on cells. As far as I know, there is no parallelization available.
```

**Reactions**

- Resolved media URL: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12_media/2764-A3D25.svg
- Resolved media URL: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png
<details>
<summary>Reactions data</summary>

```json
[
  {
    "count": 1,
    "emoji": {
      "code": "heart",
      "id": "",
      "imageUrl": "2025-12_media/2764-A3D25.svg",
      "isAnimated": false,
      "name": "❤️"
    },
    "users": [
      {
        "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
        "color": null,
        "discriminator": "0000",
        "id": "384390069412429834",
        "isBot": false,
        "name": "polyfractal",
        "nickname": "BreakingTaps"
      }
    ]
  }
]
```

</details>

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
```

</details>

---

## message-1445430006930079885

**2025-12-02T15:02:48.443+00:00 — BreakingTaps (@polyfractal)**

- Message ID: `1445430006930079885`
- Author ID: `384390069412429834`
- Nickname: BreakingTaps
- User name: polyfractal
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445430006930079885
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
interesting, thanks for the extra details!

I guess I don't know enough about the actual DRC rules themselves, why would it need branching? I assumed rules were like "if line width < X" or "If polygons too close together"
```

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
    "discriminator": "0000",
    "isBot": false
  },
  "message": {}
}
```

</details>

---

## message-1445433855119986760

**2025-12-02T15:18:05.923+00:00 — Leo Moser (mole99) (@mole99)**

- Message ID: `1445433855119986760`
- Author ID: `323371864074485771`
- Nickname: Leo Moser (mole99)
- User name: mole99
- Type: `Default`
- Discord message: https://discord.com/channels/1361349522684510449/1445300879862403164/1445433855119986760
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%8F%97%EF%B8%8F%20-%20Designing/project-template/running-drc-in-parallel/2025-12/2025-12.json
- Archive source: https://discord.wafer.space/wafer-space/%F0%9F%93%90%20-%20Designing/%F0%9F%93%9D-project-template/running-drc-in-parallel/2025-12/2025-12.json

**Content**

```text
The KLayout DRC engine is actually just a Ruby interpreter with DRC functions: https://www.klayout.de/doc/manual/drc_basic.html

> The DRC functionality is controlled by a DRC script. A DRC script is basically a piece of code which is executed in the context of the DRC engine. The script language is based on KLayout's integrated Ruby interpreter and wraps the underlying object model into a lean and expressive language. Script execution is immediate. That means, that it is possible to embed conditional statements or loops based on the result of a previous operation. It is also possible to code low-level operations on shapes inside the script, although this will be considerably slower than using the functions provided.

It is quite versatile and it even handles connectivity e.g. for antenna checks and extraction for LVS.

I don't think it would be necessary required to have this interactive/immediate operation mode, but this is simply due to the way it is implemented. However, it does allow for some useful tricks: e.g. iteratively filling until a target density is met, to name just one.

Still, it would be great to have a non immediate mode as well, as it could parallelize execution, throw out unused expressions, automatically free memory after last use etc.
```

<details>
<summary>Other message metadata</summary>

```json
{
  "author": {
    "avatarUrl": "2025-12_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
```

</details>

---
