Cannot set job priority with qadapter

Hi,

I am using qlaunch to indirectly launch fireworks. I need to set the job to the ‘med’ partition, but strangely this is not working.

When running a slurm job manually the priority is set by prepending the slurm command #SBATCH -p med argument at the head of the script to be run. For example,

#!/usr/bin/env python
#SBATCH -p med
#SBATCH --job-name=XX
#SBATCH --output=job.out
#SBATCH --error=job.err
#SBATCH --time=16:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=16 -c 2

​To do this with the qlauncher I have tried to change the qlauncher configuration file to include the partition key.

_fw_name: CommonAdapter
_fw_q_type: SLURM
ntasks: 32
partition: med
rocket_launch: rlaunch -w /home/dda/run_fw/sn_opt/my_fworker.yaml -l /home/dda/run_fw/sn_opt/my_launchpad.yaml singleshot
cpus_per_task: 1
ntasks_per_node: 1
walltime: '05:00:00'
queue: null
account: null
job_name: null
logdir: /home/dda/run_fw/sn_opt/logs
pre_rocket: source activate fw37
post_rocket: null

I have tried adding quotes around the ‘med’, yet in both situations the same (incorrect) FW_submit.script that is generated does not have the partition argument in it. The generated FW_submit.script looks like this

#!/bin/bash -l
  
#SBATCH --ntasks=32
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=1
#SBATCH --time=05:00:00
#SBATCH --job-name=FW_job
#SBATCH --output=FW_job-%j.out
#SBATCH --error=FW_job-%j.error


source activate fw37
cd /home/dda/run_fw/sn_opt
rlaunch -w /home/dda/run_fw/sn_opt/my_fworker.yaml -l /home/dda/run_fw/sn_opt/my_launchpad.yaml singleshot

# CommonAdapter (SLURM) completed writing Template

I have double checked and found that the line #SBATCH --partition=$${queue} is present in the SLURM_template.txt file, yet for some reason it is not being parsed correctly.

Does anyone have any idea what could be going wrong?
Thank you

The alias for partition in the qadapter is queue. You can see that in the template line #SBATCH --partition=$${queue}. So in your adapter type queue: med and it should work.

1 Like

Thank you. This solved my issue. I didn’t initially understand the alias naming scheme. Adding queue: med to my qadapter.yaml file solved the issue.