From 85031e34c1861f37b6712e4b0d36f9234341f529 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Fri, 8 Nov 2024 11:06:57 +0000 Subject: [PATCH] remove push/pull/move from LocalProvider --- parsl/providers/local/local.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/parsl/providers/local/local.py b/parsl/providers/local/local.py index f13521466a..5ecf174df2 100644 --- a/parsl/providers/local/local.py +++ b/parsl/providers/local/local.py @@ -32,9 +32,6 @@ class LocalProvider(ExecutionProvider, RepresentationMixin): Ratio of provisioned task slots to active tasks. A parallelism value of 1 represents aggressive scaling where as many resources as possible are used; parallelism close to 0 represents the opposite situation in which as few resources as possible (i.e., min_blocks) are used. - move_files : Optional[Bool] - Should files be moved? By default, Parsl will try to figure this out itself (= None). - If True, then will always move. If False, will never move. worker_init : str Command to be run before starting a worker, such as 'module load Anaconda; source activate env'. """ @@ -48,8 +45,7 @@ def __init__(self, max_blocks=1, worker_init='', cmd_timeout=30, - parallelism=1, - move_files=None): + parallelism=1): self.channel = channel self._label = 'local' self.nodes_per_block = nodes_per_block @@ -61,7 +57,6 @@ def __init__(self, self.parallelism = parallelism self.script_dir = None self.cmd_timeout = cmd_timeout - self.move_files = move_files # Dictionary that keeps track of jobs, keyed on job_id self.resources = {} @@ -83,7 +78,6 @@ def status(self, job_ids): if job_dict['status'] and job_dict['status'].terminal: # We already checked this and it can't change after that continue - # Script path should point to remote path if _should_move_files() is True script_path = job_dict['script_path'] alive = self._is_alive(job_dict) @@ -137,8 +131,6 @@ def _is_alive(self, job_dict): def _job_file_path(self, script_path: str, suffix: str) -> str: path = '{0}{1}'.format(script_path, suffix) - if self._should_move_files(): - path = self.channel.pull_file(path, self.script_dir) return path def _read_job_file(self, script_path: str, suffix: str) -> str: @@ -216,9 +208,6 @@ def submit(self, command, tasks_per_node, job_name="parsl.localprovider"): job_id = None remote_pid = None - if self._should_move_files(): - logger.debug("Pushing start script") - script_path = self.channel.push_file(script_path, self.channel.script_dir) logger.debug("Launching") # We need to capture the exit code and the streams, so we put them in files. We also write @@ -254,9 +243,6 @@ def submit(self, command, tasks_per_node, job_name="parsl.localprovider"): return job_id - def _should_move_files(self): - return (self.move_files is None and not isinstance(self.channel, LocalChannel)) or (self.move_files) - def cancel(self, job_ids): ''' Cancels the jobs specified by a list of job ids