Skip to content

Commit

Permalink
Minor PBS Server improvements (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinp0 committed Apr 17, 2023
2 parents 38c4ba3 + c62382e commit 0bb617a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arc/job/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def write_submit_script(self) -> None:
name=self.job_server_name,
un=servers[self.server]['un'],
t_max=self.format_max_job_time(time_format=t_max_format[servers[self.server]['cluster_soft']]),
memory=int(self.submit_script_memory) if isinstance(self.submit_script_memory, int) else self.submit_script_memory,
memory=int(self.submit_script_memory) if (isinstance(self.submit_script_memory, int) or isinstance(self.submit_script_memory, float)) else self.submit_script_memory,
cpus=self.cpu_cores,
architecture=architecture,
max_task_num=self.workers,
Expand Down
2 changes: 2 additions & 0 deletions arc/job/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ def submit_job(path: str,
submit_filename=submit_filename,
recursion=True,
)
elif cluster_soft.lower() == 'pbs' and any('qsub: Illegal attribute or resource value' in err_line for err_line in stderr):
raise ValueError(f'Got the following error when trying to submit job:\n{stderr}. Please check your submit script')
if not len(stdout) or recursion:
return None, None
if len(stderr) > 0 or len(stdout) == 0:
Expand Down

0 comments on commit 0bb617a

Please sign in to comment.