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

indentation issue on pbs exec #33

Merged
merged 1 commit into from
Oct 17, 2023
Merged
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
56 changes: 28 additions & 28 deletions jarvis_util/shell/pbs_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,40 @@ def __init__(self, cmd, exec_info):
super().__init__(self.pbscmd(),
exec_info.mod(env=exec_info.basic_env))

def generate_qsub_command(self):
cmd = 'qsub'
def generate_qsub_command(self):
cmd = 'qsub'

if self.interactive:
cmd += ' -I'
if self.interactive:
cmd += ' -I'

options_map = {
'filesystems': 'l filesystems',
'walltime': 'l walltime',
'account': 'A',
'queue': 'q'
}
options_map = {
'filesystems': 'l filesystems',
'walltime': 'l walltime',
'account': 'A',
'queue': 'q'
}

if self.nnodes and self.system:
cmd += f' -l select={self.nnodes}:system={self.system}'
elif self.nnodes:
cmd += f' -l select={self.nnodes}'
else:
raise ValueError("System defined without select value.")
if self.nnodes and self.system:
cmd += f' -l select={self.nnodes}:system={self.system}'
elif self.nnodes:
cmd += f' -l select={self.nnodes}'
else:
raise ValueError("System defined without select value.")

for attr, option in options_map.items():
value = getattr(self, attr)
if value is not None:
cmd += f' -{option}={value}'
for attr, option in options_map.items():
value = getattr(self, attr)
if value is not None:
cmd += f' -{option}={value}'

cmd += f' {self.cmd}'
return cmd
cmd += f' {self.cmd}'
return cmd

def pbscmd(self):
cmd = self.generate_qsub_command()
jutil = JutilManager.get_instance()
if jutil.debug_pbs:
print(cmd)
return cmd
def pbscmd(self):
cmd = self.generate_qsub_command()
jutil = JutilManager.get_instance()
if jutil.debug_pbs:
print(cmd)
return cmd


class PbsExecInfo(ExecInfo):
Expand Down
Loading