From 007c0e242ddcc4285fddc978b1ae39d39102abde Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Fri, 12 Jul 2019 09:16:17 +0200 Subject: [PATCH] Change to workdir before merging job array files * Add logging info when an array job is detected and during file merging. --- reframe/core/schedulers/slurm.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index 481443785f..d6efe47471 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -189,10 +189,15 @@ def _get_default_partition(self): return None def _merge_files(self): - output_glob = glob.glob(self.stdout + '_*') - err_glob = glob.glob(self.stderr + '_*') - os_ext.concat_files(self.stdout, *output_glob, overwrite=True) - os_ext.concat_files(self.stderr, *err_glob, overwrite=True) + with os_ext.change_dir(self.workdir): + out_glob = glob.glob(self.stdout + '_*') + err_glob = glob.glob(self.stderr + '_*') + getlogger().debug( + 'merging job array output files: %s' % ', '.join(out_glob)) + os_ext.concat_files(self.stdout, *out_glob, overwrite=True) + getlogger().debug( + 'merging job array error files: %s' % ','.join(err_glob)) + os_ext.concat_files(self.stderr, *err_glob, overwrite=True) def filter_nodes(self, nodes, options): option_parser = ArgumentParser() @@ -422,6 +427,7 @@ def is_job_array(self): jobs_array = parsed_args.array if jobs_array: self._is_job_array = True + getlogger().debug('detected job array option: %s' % jobs_array) else: self._is_job_array = False