Namespace fomac::slurm

namespace slurm

Functions

Device openDeviceFromLicense()

Opens the QDMI device named by the Slurm license environment.

The SLURM_JOB_LICENSES value must contain exactly one local license. Its name must equal a registered QDMI device ID. The optional license count must be one. The device must report QDMI_DEVICE_STATUS_IDLE or QDMI_DEVICE_STATUS_BUSY.

Warning

This function uses process-mutable environment data for device selection. It does not verify a Slurm allocation, authenticate the caller, or authorize access to the device. The provider or operating system must enforce access independently.

Throws:

std::runtime_error – If the license value is missing, malformed, compound, remote, has a non-unit count, names an unknown device, or names a device in another state.

Returns:

A fresh device session using the registered device definition.