[slurm-users] Multiple accounts/partitions for a user

Simon Flood S.M.Flood at uis.cam.ac.uk
Thu May 10 09:12:47 MDT 2018

On 10/05/18 15:59, Mahmood Naderan wrote:

> Is it possible to assign a user to two partitions/accounts? I did
> that. But the sbatch isn't able to submit the job.
> [mahmood at rocks7 ~]$ cat slurm.sh
> #!/bin/bash
> #SBATCH --output=test.out
> #SBATCH --job-name=test
> #SBATCH --ntasks=6
> #SBATCH --partition=PLAN1
> #SBATCH --mem=8G
> mpirun /share/apps/mechanic/lammps-16Mar18/src/lmp_mpi < in.lj
> [mahmood at rocks7 ~]$ sacctmgr list association
> format=account,user,partition | grep mahmood
>         em1    mahmood    plan1
>     monthly    mahmood    plan2
> [mahmood at rocks7 ~]$ sbatch slurm.sh
> sbatch: error: Batch job submission failed: Invalid account or
> account/partition combination specified

Yes it's possible for a user to be attached to more than one account or 
to an account with more than partition.

As per the error message you have not specified the account in your job 
submission script slurm.sh. You need to add the following line

	#SBATCH --account=<account>

replacing <account> with either 'em1' or 'monthly' (without quotes) as 
per your sacctmgr output.

Simon Flood
HPC System Administrator
University of Cambridge Information Services
United Kingdom

More information about the slurm-users mailing list