Error · SLURM · 5 min read
"Batch job submission failed: Invalid account or account/partition combination specified"
sbatch: error: Batch job submission failed: Invalid account or account/partition combination specifiedThat is what sbatch prints when it refuses the job at submission: nothing is queued, and there is no job id. The wording is from SLURM's source code and was seen word for word on a SLURM 25.11.8 test cluster, both for a made-up account name and for a user the cluster had no account record for.
Checked against the docs · SLURM 26.05 and real output from SLURM 25.11.8 · Last checked 12 November 2026 · Spot a mistake? Tell us
Short answer
SLURM refused the job because the account it would be charged to is not one you may use, or not one you may use on that partition. List the accounts you have with sacctmgr show associations users=$USER, then submit with one of them in --account, on a partition that account covers.
What does this error mean?
Every SLURM job is charged to an account: usually your group's allocation, named with --account (or -A) in the job script. The sbatch page calls the account "an arbitrary string", but a cluster that keeps accounting can check it. The check is against your associations: the accounting docs define an association as the combination of cluster, account, user and, optionally, partition, and SLURM keeps one record for each combination you are allowed.
When the cluster's administrators set AccountingStorageEnforce to include associations, the docs say this "will prevent users from running jobs if their association is not in the database" and "will prevent users from accessing invalid accounts". A job whose account, user and partition match none of your associations is refused with the line above. That setting is off by default; without it, the docs say jobs run "based upon policies configured in Slurm on each cluster", and on the test cluster any account name was then accepted.
The "account/partition combination" part matters because an association can be tied to one partition: the accounting docs show an administrator adding a user to an account with Partition= set. Such an account is valid on that partition and refused on the others.
What usually causes it?
- A typo in the account name, or a name copied from a colleague's script or a cluster guide example.
- An account you are not (yet) a member of: a new user whose account has not been set up, or an allocation that has ended.
- The right account on the wrong partition, where your association names a partition.
- No account in the script, and no default account for you. If you have a default account, a job without
--accountis charged to it (the accounting docs: the default is used "if he doesn't specify one in the job submission command"). On the test cluster, a user with no association at all got this same line with or without--account. - An account set somewhere you forgot.
sbatchalso reads the environment variableSBATCH_ACCOUNT. Thesbatchpage says environment variables override options in the batch script, and command-line options override environment variables, so an oldexport SBATCH_ACCOUNT=...in your shell's start-up file wins over the script.
What should I try, in order?
-
List the accounts you may use. On the login node:
Terminalsacctmgr show associations users=$USER format=Cluster,Account,User,PartitionEach line is one association. An empty
Partitioncolumn means the account is not tied to a partition.sacctmgr show user $USERprints your default account (DefaultAccount). The docs note that a site can hide some of this from users (PrivateDatainslurm.conf); if the commands show nothing, ask your cluster's administrators. -
Compare the job's account with that list, letter for letter. Look at the
#SBATCH --account=line, any-Aor--accounton the command line, andecho $SBATCH_ACCOUNT. -
Match the account to the partition. If your association names a partition, submit to that partition (
--partition), or use an account that covers the one you want. -
If you have no association at all, only the administrators can add one; your cluster's documentation says whom to ask and which account your group should use.
The account names, which partitions each one covers and who sets them up are local to each cluster: the SLURM documentation cannot tell you yours.
What if the job was accepted but waits with InvalidAccount?
A job that is already in the queue can show the pending reason InvalidAccount, which the Job Reason Codes page describes as "The job's account is invalid". It will not start until that changes; cancel it with scancel and submit it again with a valid --account. Why is my job still waiting? covers the other reasons.
Verlet writes the account into each job script as --account, from the "Account or allocation" field of the cluster in Settings → Clusters, so you set it once per cluster. If sbatch refuses the job, the run strip shows sbatch's own message and nothing is submitted, so you can fix the account and submit again.