Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't export the user's environment to the job #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion smartdispatch/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions smartdispatch/tests/test_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 #
Expand All @@ -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
Expand Down