diff --git a/jarvis_util/shell/pbs_exec.py b/jarvis_util/shell/pbs_exec.py index 27c172c..ef960f6 100644 --- a/jarvis_util/shell/pbs_exec.py +++ b/jarvis_util/shell/pbs_exec.py @@ -39,9 +39,12 @@ def generate_qsub_command(self): if self.interactive: cmd += ' -I' - options_map = { + equal_map = { 'filesystems': 'l filesystems', 'walltime': 'l walltime', + } + + non_equal_map ={ 'account': 'A', 'queue': 'q' } @@ -53,11 +56,16 @@ def generate_qsub_command(self): else: raise ValueError("System defined without select value.") - for attr, option in options_map.items(): + for attr, option in equal_map.items(): value = getattr(self, attr) if value is not None: cmd += f' -{option}={value}' + for attr, option in non_equal_map.items(): + value = getattr(self, attr) + if value is not None: + cmd += f' -{option} {value}' + cmd += f' {self.cmd}' return cmd