# detect_compute_nodes { #vscodenb.detect_compute_nodes }

```python
vscodenb.detect_compute_nodes()
```

Detect compute nodes and allocated CPUs.

Returns list of NodeInfo objects, one per node.
For local execution, returns single node.
For SLURM, returns all allocated nodes.