diff --git a/reframe/core/schedulers/pbs.py b/reframe/core/schedulers/pbs.py index c5eb2dc5bb..314ad884dd 100644 --- a/reframe/core/schedulers/pbs.py +++ b/reframe/core/schedulers/pbs.py @@ -95,6 +95,10 @@ def emit_preamble(self, job): self._format_option('-e %s' % job.stderr), ] + if job.sched_account: + preamble.append( + self._format_option('-A %s' % job.sched_account)) + if job.time_limit is not None: h, m, s = seconds_to_hms(job.time_limit.total_seconds()) preamble.append( diff --git a/unittests/test_schedulers.py b/unittests/test_schedulers.py index 5a8599f4ac..f5264c23ef 100644 --- a/unittests/test_schedulers.py +++ b/unittests/test_schedulers.py @@ -184,6 +184,7 @@ def _expected_pbs_directives(job): '#PBS -l walltime=0:5:0', '#PBS -o %s' % job.stdout, '#PBS -e %s' % job.stderr, + '#PBS -A %s' % job.sched_account, '#PBS -l select=%s:mpiprocs=%s:ncpus=%s' ':mem=100GB:cpu_type=haswell' % (num_nodes, job.num_tasks_per_node, @@ -203,6 +204,7 @@ def _expected_torque_directives(job): '#PBS -l walltime=0:5:0', '#PBS -o %s' % job.stdout, '#PBS -e %s' % job.stderr, + '#PBS -A %s' % job.sched_account, '#PBS -l nodes=%s:ppn=%s:haswell' % (num_nodes, num_cpus_per_node), '#PBS -l mem=100GB', '#PBS -q %s' % job.sched_partition,