def run(self): """Runs all Ntuple production jobs -- either locally or on the batch system. """ record_software_state(self.sw_ver_file_cfg, self.sw_ver_file_out, DEPENDENCIES) run_cmd( "make -f %s -j %i 2>%s 1>%s" % \ (self.makefile, self.num_parallel_jobs, self.stderr_file_path, self.stdout_file_path), False )
def run(self, clean): record_software_state(self.sw_ver_file_cfg, self.sw_ver_file_out, DEPENDENCIES) target = 'all' if clean: if not os.path.isfile(self.makefile_path): logging.error( "The makefile %s is missing and therefore it's not possible to clean anything; " "run sync Ntuple production first!" % self.makefile_path ) sys.exit(1) target = 'clean' nof_parallel_jobs = len(self.channel_info) make_cmd = "make -f %s -j %d %s 2>%s 1>%s" % \ (self.makefile_path, nof_parallel_jobs, target, self.stderr_file_path, self.stdout_file_path) logging.info("Running the make command: %s" % make_cmd) run_cmd(make_cmd) logging.info("All done")
def run(self, clean): record_software_state(self.sw_ver_file_cfg, self.sw_ver_file_out, DEPENDENCIES) target = 'all' if clean: if not os.path.isfile(self.makefile_path): logging.error( "The makefile %s is missing and therefore it's not possible to clean anything; " "run sync Ntuple production first!" % self.makefile_path) sys.exit(1) target = 'clean' nof_parallel_jobs = len(self.channel_info) make_cmd = "make -f %s -j %d %s 2>%s 1>%s" % \ (self.makefile_path, nof_parallel_jobs, target, self.stderr_file_path, self.stdout_file_path) if self.running_method.lower() == "makefile": run_dir = re.sub('^/home', '/scratch', self.config_dir) create_if_not_exists(run_dir) make_cmd = re.sub('^make', 'make -C {}'.format(run_dir), make_cmd) logging.info("Running the make command: %s" % make_cmd) run_cmd(make_cmd) logging.info("All done")