From ffd9dda1131633b8cb78e7ebfb9c7bd339d9130d Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 10 Jul 2023 10:31:11 -0600 Subject: [PATCH] Bug fixes to work with a flux version on a workstation --- pysqa/ext/remote.py | 2 +- pysqa/wrapper/flux.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pysqa/ext/remote.py b/pysqa/ext/remote.py index c1e8150d..a3b8c1b9 100644 --- a/pysqa/ext/remote.py +++ b/pysqa/ext/remote.py @@ -65,7 +65,7 @@ def submit_job( ) self._transfer_data_to_remote(working_directory=working_directory) output = self._execute_remote_command(command=command) - return int(output.split()[-1]) + return output.split()[-1] def enable_reservation(self, process_id): """ diff --git a/pysqa/wrapper/flux.py b/pysqa/wrapper/flux.py index c0ea425a..5e98af99 100644 --- a/pysqa/wrapper/flux.py +++ b/pysqa/wrapper/flux.py @@ -5,18 +5,21 @@ from pysqa.wrapper.generic import SchedulerCommands +command_lst = ["/bin/bash", "-i", "-c", "remote_flux"] + + class FluxCommands(SchedulerCommands): @property def submit_job_command(self): - return ["flux", "batch"] + return command_lst + ["batch"] @property def delete_job_command(self): - return ["flux", "cancel"] + return command_lst + ["cancel"] @property def get_queue_status_command(self): - return ["flux", "jobs", "-a", "--no-header"] + return command_lst + ["jobs", "-a", "--no-header"] @staticmethod def get_job_id_from_output(queue_submit_output):