diff --git a/smartdispatch/pbs.py b/smartdispatch/pbs.py index f8d7982..dd7bf2b 100644 --- a/smartdispatch/pbs.py +++ b/smartdispatch/pbs.py @@ -36,7 +36,7 @@ def __init__(self, queue_name, walltime): self.add_options(q=queue_name) # Declares that all environment variables in the qsub command's environment are to be exported to the batch job. - self.add_options(V="") + self.add_options(v="PBS_FILENAME") def add_options(self, **options): """ Adds options to this PBS file. diff --git a/smartdispatch/tests/test_pbs.py b/smartdispatch/tests/test_pbs.py index 6088052..146b845 100644 --- a/smartdispatch/tests/test_pbs.py +++ b/smartdispatch/tests/test_pbs.py @@ -29,7 +29,7 @@ def test_constructor(self): def test_add_options(self): # Default options assert_equal(len(self.pbs.options), 2) - assert_true('-V' in self.pbs.options.keys()) + assert_equal(self.pbs.options['-v'], 'PBS_FILENAME') assert_equal(self.pbs.options['-q'], self.queue_name) self.pbs.add_options(A="option1") @@ -73,7 +73,7 @@ def test_str(self): # Create simple PBS file expected = """#!/bin/bash #PBS -q qtest@mp2 -#PBS -V +#PBS -v PBS_FILENAME #PBS -l walltime=01:00:00 # Modules # @@ -98,7 +98,7 @@ def test_str(self): expected = """\ #!/bin/bash #PBS -q qtest@mp2 -#PBS -V +#PBS -v PBS_FILENAME #PBS -A xyz-123-ab #PBS -l walltime=01:00:00 #PBS -l nodes=2:ppn=3:gpus=1