Skip to content

Commit

Permalink
Merge pull request #36 from JaimeCernuda/master
Browse files Browse the repository at this point in the history
added support top pass environmental variables through pbs
  • Loading branch information
JaimeCernuda authored Oct 17, 2023
2 parents eab6997 + c2b5887 commit eb2d51e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jarvis_util/shell/pbs_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self, cmd, exec_info):
self.walltime = exec_info.walltime
self.account = exec_info.account
self.queue = exec_info.queue
self.env_vars = exec_info.env_vars
super().__init__(self.pbscmd(),
exec_info.mod(env=exec_info.basic_env))

Expand All @@ -46,7 +47,8 @@ def generate_qsub_command(self):

non_equal_map ={
'account': 'A',
'queue': 'q'
'queue': 'q',
'env_vars' : '-v'
}

if self.nnodes and self.system:
Expand Down Expand Up @@ -80,7 +82,8 @@ def pbscmd(self):
class PbsExecInfo(ExecInfo):
def __init__(self, **kwargs):
super().__init__(exec_type=ExecType.PBS, **kwargs)
allowed_options = ['interactive', 'nnodes', 'system', 'filesystems', 'walltime', 'account', 'queue']
allowed_options = ['interactive', 'nnodes', 'system', 'filesystems',
'walltime', 'account', 'queue', 'env_vars']
self.keys += allowed_options
# We use output and error file from the base Exec Info
for key in allowed_options:
Expand Down

0 comments on commit eb2d51e

Please sign in to comment.