> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Topology and block scheduling in Slurm

> Configure topology and block scheduling in Slurm for optimized job placement on NVLink-connected GPU systems

<Badge stroke shape="pill" color="blue" size="md">[SUNK Standard](/products/sunk)</Badge>

<Badge stroke shape="pill" color="green" size="md">[SUNK Self-Service](/products/sunk/about-self-service-sunk)</Badge>

CoreWeave's [GB200 and GB300 NVL72-powered instances](/platform/instances/nvl72) use NVIDIA's Grace Blackwell Superchip and NVLink Switch System, integrated within a single rack. Vera Rubin instances pair NVIDIA Vera Arm CPUs with Rubin GPUs in the same rack-scale NVLink design. The NVLink fabric enables direct memory access between GPUs, which allows high-speed communication and efficient data sharing.

To fully take advantage of the NVL72 architecture, CoreWeave recommends the Topology/Block Plugin with Slurm. This plugin improves job scheduling because it places nodes from the same job within the same rack whenever possible, which maximizes NVLink fabric performance. Optimized job placement within the NVLink domain increases resource efficiency and enhances GPU communication, critical for large-scale distributed workloads where minimal processing time is essential.

This guide is for SUNK cluster operators and users submitting jobs to NVL72-powered systems. It explains the concepts behind the Topology/Block Plugin, shows example job placement scenarios, describes how to identify idle nodes available for scheduling, and works through why a job that uses `--segment` can be rejected.

## Concepts

The Slurm Topology/Block Plugin adds new features for managing job placement within NVLink domains. Key concepts include **Blocks**, **Segments**, and the `--exclusive=topo` option.

When SUNK auto-generates the topology file, it defines Blocks based on the `ds.coreweave.com/nvlink.domain` label on CKS Nodes. For [GB200, GB300, and Vera Rubin NVL72-powered nodes](/platform/instances/nvl72), this label is a globally unique rack identifier, for example, `DH4-016-US-EAST-02A`.

In clusters with both NVLink-enabled multi-node systems and standard nodes, SUNK creates a topology.conf file that includes Block and switch definitions. This configuration doesn't affect behavior unless you explicitly enable the Topology/Block Plugin, which ensures safe integration and runtime flexibility.

### Blocks

A **Block** is a group of nodes in the same Slurm cluster, defined in the `topology.conf` file. SUNK automatically generates this file, so you don't need to create or manage it manually. It specifies which nodes belong to each Block and defines the **Block size**, the number of nodes in a Block.

Each Block has a unique ID and cannot overlap with others. CoreWeave dynamically updates the topology configuration to reflect changes in node availability. By default, each [GB200, GB300, or Vera Rubin NVL72-based](/platform/instances/nvl72) system corresponds to a Block containing 18 nodes in the same NVLink domain. A node that is drained or down stays in the Block, so the Block size is unchanged and the Block simply has fewer nodes available to schedule. Run `scontrol show topology` to see the current `BlockSize` and node list for each Block.

### Segments

A Segment is a set of nodes within a Block that Slurm allocates together. It must fit within a single Block and cannot cross Block boundaries. Segments reduce resource fragmentation because they keep allocations intact. If a job spans multiple Blocks, Slurm schedules equal-sized Segments in each Block. A Block can hold multiple Segments if space allows.

By default, if you don't provide a segment size, Slurm uses the full Block size.

The following are best practices when configuring segment size:

* When you select a segment size for your job, default to `--segment=1`. This makes your job more flexible because it can run on any available nodes across all Blocks, which improves scheduling efficiency.

* On GB200 NVL72 systems, don't use a segment size larger than `--segment=16`. This gives a buffer for nodes to fail on a rack before it becomes unusable for your job.

* On GB200 NVL72 systems, balance segment sizes across jobs on your cluster with factors of 16 (8, 4, 2, 1). This minimizes the number of idle nodes on each rack left unavailable to your jobs.

* Always set the segment size explicitly. If you omit the segment size, Slurm defaults to `--segment=18`. This adds additional scheduling constraints and can cause submission failures.

All examples in this guide follow these best practices by specifying the segment size to ensure reliable scheduling.

### Exclusive option

The `--exclusive=topo` option ensures that only the job being submitted runs in a Block. The job won't share a Block with any other job, and no new jobs can be placed there until the original job completes. Unused nodes in the Block remain idle. Use this option for benchmarking or to avoid resource competition.

When `srun --exclusive` starts a new job and you set `--ntasks`, the job gets the whole node, but the job step gets only the CPUs those tasks request. A step started this way with `--ntasks=1` and no `--cpus-per-task` runs on a single core. See [Why does my exclusive Slurm job use only one CPU core?](/support/sunk/articles/why-does-my-exclusive-slurm-job-use-only-one-cpu-core).

<Warning>
  Using `--exclusive=topo` can result in idle nodes if your job doesn't fill the entire Block. To avoid wasting resources, apply this option only when needed, such as for benchmarking or when your workload requires exclusive access to a Block without sharing with other jobs.
</Warning>

## Example scenarios

The following scenarios show how to use the Topology/Block Plugin to optimize job placement within [GB200, GB300, and Vera Rubin NVL72-based systems](/platform/instances/nvl72). Use them as reference patterns when sizing your own jobs and choosing segment sizes. Each diagram shows multiple 18-node NVL72 systems (Blocks). Node colors represent status:

* **Green**: nodes running the requested job (light green indicates a second job or Segment)
* **Gray**: Unavailable: drained, down, or running unrelated jobs
* **White**: Idle

### A job that fits in a Block

A job requests **10** nodes, which is less than the Block size. The segment size is set to **1**, following [best practice](#segments).

```bash theme={"system"}
srun --nodes=10 --segment=1 ...
```

The plugin allocates **10** nodes from Block 1. The rest of Block 1 and Block 2 remain idle.

<Frame caption="Job requests 10 nodes.">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-1.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=2d88f4c484546355bffbf28ffb0710e6" alt="Job requests 10 nodes." width="809" height="237" data-path="products/sunk/_media/topology-block-1.png" />
</Frame>

### Jobs larger than the Block size

A job requests **20** nodes, which exceeds the Block size of **18**. The segment size is set to **1**, following [best practice](#segments).

```bash theme={"system"}
srun --nodes=20 --segment=1 ...
```

Two nodes are unavailable in Block 1, so the plugin allocates **16** nodes from Block 1 and **4** nodes from Block 2. The rest of Block 2 remains idle.

<Frame caption="Job requests 20 nodes">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-2.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=b9e89538b435ffa109c184aa08e30346" alt="Job requests 20 nodes" width="806" height="236" data-path="products/sunk/_media/topology-block-2.png" />
</Frame>

### Two jobs in a single Block

You submit two jobs. The first requests **8** nodes, and the second requests **4**. The segment size is set to **1** for both jobs, following [best practice](#segments).

```bash theme={"system"}
srun --nodes=8 --segment=1 ... && srun --nodes=4 --segment=1 ...
```

The plugin places both jobs in Block 1. The rest of Block 1 and Block 2 remain idle.

<Frame caption="Two jobs can fit in a single Block">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-3.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=03ab4146195b0beb9fe951032ba9af1b" alt="Two jobs can fit in a single Block" width="807" height="236" data-path="products/sunk/_media/topology-block-3.png" />
</Frame>

### Realistic training example: A job with two Segments

A job requests **32** nodes, divided into two Segments of **16** nodes each.

```bash theme={"system"}
srun --nodes=32 --segment=16 ...
```

The plugin places the first Segment in Block 1 and the second Segment in Block 2.

Two nodes are left idle in Block 1 because Segments cannot span Blocks.

<Frame caption="A job with two Segments">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-5.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=07289202c8c8539ab682e15a60475337" alt="A job with two Segments" width="808" height="237" data-path="products/sunk/_media/topology-block-5.png" />
</Frame>

### Exclusive jobs

A job requests **16** nodes with the `--exclusive=topo` option. The segment size is set to **1**, following [best practice](#segments).

```bash theme={"system"}
srun --nodes=16 --segment=1 --exclusive=topo ...
```

The plugin places the job in Block 2 because `--exclusive=topo` prevents it from running in Block 1 while a competing job (light green) is active. The rest of Block 2 remains idle, and no other jobs can run there until this job completes.

<Frame caption="Exclusive jobs">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-6.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=94154fc9dde02dec6b915809b929ecdb" alt="Exclusive jobs" width="806" height="236" data-path="products/sunk/_media/topology-block-6.png" />
</Frame>

### Combining Segments and the exclusive option

A job requests **16** nodes, divided into two **8**-node Segments, using `--exclusive=topo`.

```bash theme={"system"}
srun --nodes=16 --segment=8 --exclusive=topo ...
```

The plugin places both Segments (green and light green) in Block 2 because Block 1 is unavailable because of an existing job (dark green). The rest of Block 2 remains idle, and no other jobs can run there until both job Segments complete.

<Frame caption="Combining Segments and Exclusive jobs">
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/lW-m410I_gVGZZCw/products/sunk/_media/topology-block-7.png?fit=max&auto=format&n=lW-m410I_gVGZZCw&q=85&s=6590df6e3046e2e90de4dfa732cf521a" alt="Combining Segments and Exclusive jobs" width="808" height="235" data-path="products/sunk/_media/topology-block-7.png" />
</Frame>

## Identify idle nodes in a Block

Before you submit a job, you can check how many nodes are currently idle in each Block to choose a segment size that schedules promptly. Use the script at `/usr/share/sunk/bin/segment-calc.sh` on the Slurm login node to check for idle nodes within a Block. By default, it reports idle nodes per topology Block. You can optionally provide the `--segment N` argument to report only those Blocks with at least `N` idle nodes available.

### Example usage

```bash theme={"system"}
./segment-calc.sh --segment 6
```

Example output:

```text theme={"system"}
Block                                 IDLE / SIZE
----------------------------------- ------   -----
block_DH4-004-US-EAST-02A                8 / 18
block_DH4-012-US-EAST-02A                8 / 18
block_DH4-013-US-EAST-02A                8 / 18
block_DH4-017-US-EAST-02A                8 / 18
block_DH4-043-US-EAST-02A               18 / 18

Blocks with ≥ 6 idle nodes : 5
Whole segments schedulable             : 7
Total nodes those segments consume     : 42
```

This output shows the Blocks with at least 6 idle nodes, along with the total number of whole segments Slurm can schedule and the total nodes those segments would consume.

## Troubleshoot "Requested node configuration is not available" with `--segment`

A job that uses `--segment`, often combined with `--exclude`, can be rejected at submission or stay `PENDING` with the reason `Requested node configuration is not available`. This usually means the segment math can't be satisfied, not that the cluster is out of capacity.

Work through these causes in order:

1. **You combined `--segment` with `--nodelist`.** Slurm doesn't support both at once, so this combination always fails, whatever the cluster's state. Drop one of them. To steer a job toward particular hardware, use `--constraint` instead of a node list. See [Block limitations](https://slurm.schedmd.com/topology.html#block-limitations) in the Slurm documentation.

2. **You requested GPUs with `--gpus-per-task`.** `--gpus-per-task` combined with `--segment` is rejected even when enough nodes are idle. Use `--gpus-per-node` instead. To confirm this is the cause, submit the same job three ways with `--test-only`: with no GPU flag, with `--gpus-per-node`, and with `--gpus-per-task`. Only the last one fails.

3. **The segment size is larger than the available nodes in any single Block.** A Segment must fit within one Block and can't cross Block boundaries. If drains have reduced a Block below your requested segment size, no Block can hold the Segment. Check how many nodes are idle per Block with `/usr/share/sunk/bin/segment-calc.sh` as shown in [Identify idle nodes in a Block](#identify-idle-nodes-in-a-block), then choose a segment size that fits.

4. **`--exclude` removed nodes a Block needs to reach the segment size.** Excluding specific nodes can drop a Block below the requested segment size, leaving no Block able to satisfy the request. Relax or remove the `--exclude` list, or lower the segment size to fit the remaining nodes. If you need nodes kept out of scheduling for longer, ask an administrator for a reservation or a drain, which works with `--segment` where `--exclude` struggles.

5. **The total node count isn't divisible by the segment size.** If a job spans multiple Blocks, Slurm schedules equal-sized Segments in each Block. Make sure `--nodes` is a multiple of `--segment`.

6. **You omitted the segment size, so it defaulted higher than expected.** If you don't set a segment size, Slurm defaults to the full Block size, which adds constraints that can cause submission failures. Always set the segment size explicitly.

A request that fit yesterday can fail today if nodes in the target Block were drained, because a drained node still counts toward the Block size but can't run your job.

## More information

To learn more about the Topology/Block Plugin for Slurm, including configuration options and advanced usage, see the [Slurm documentation](https://slurm.schedmd.com/topology.html). For help configuring the plugin on your [NVL72-powered instances](/platform/instances/nvl72), contact CoreWeave Support.
