Slurm accounting and fairshare¶
What Is Slurm Accounting?¶
Slurm accounting allows CARC to track resource usage and use that information to make scheduling decisions.
When a job runs, the resources consumed by that job (such as CPUs and memory) are tracked and associated with a Slurm account. At CARC, accounts correspond to CARC projects.
When a cluster is under heavy utilization, projects with lower historical resource usage may receive higher scheduling priority than projects with higher historical resource usage.
Accounting Commands¶
You can view the accounts you belong to using the myaccounts command.
Example:
The account name corresponds to the project ID.
To view additional information about an account, use:
Example:
The Org column displays the username of the PI associated with the project.
Choosing an Account for a Job¶
There are three ways a job can be associated with an account. Slurm checks them in the following order:
--account=<account_name>specified during job submission~/.default_slurm_account- Your default account (typically the most recently assigned project)
Once a valid account is found, Slurm stops checking subsequent options.
1. --account¶
The --account option can be specified either:
- Directly in an
sruncommand, or - In an
sbatchsubmission script using the#SBATCHdirective
Examples:
or
This option takes precedence over all other methods of account selection.
2. ~/.default_slurm_account¶
If a file named .default_slurm_account exists in your home directory and contains a valid account name, Slurm will use that account whenever --account is not specified.
Example:
You can view the current default account with:
3. Default Account¶
If you do not specify --account and there is no valid ~/.default_slurm_account, Slurm will charge usage to your configured default account.
You can view your current default account with:
Example:
You can then inspect that account with:
This QuickByte was validated on June 22, 2026.
Migrated from UNM-CARC QuickBytes (last source update 2026-06-24). Spotted a problem? Open an issue or pull request.