print(colors.OKBLUE + "Will run on grid: %s" % data['grid'] + colors.ENDC) print("Optimisation mode: %s" % data['mode']) print("Using the following points: %s" % ", ".join(data['points'])) if args.force: print("") print(colors.WARNING + "USING --force COULD POLLUTE YOUR OUTPUT DIRECTORY" + colors.ENDC) print("") if not args.local and args.site == "default": inputConfig = InputConfig() args.site = inputConfig.site print(colors.OKGREEN + "Running %d commands" % len(data['commands']) + colors.ENDC) # We can either do this locally, or on a grid if args.local: runLocalCommands(args, dirname, data['commands']) else: # TODO: here we initialise a class based on a pass grid name, which loads settings # from batch.cfg and can run all of it runBatchCommands(args, dirname, data['commands']) # Keep a copy of the optimisation used in the output dir copiedFilename = os.path.join(dirname, os.path.basename(args.filename)) if not args.dry_run and os.path.abspath( args.filename) != os.path.abspath(copiedFilename): shutil.copyfile(args.filename, os.path.join(copiedFilename))
if not args.local and args.site == "default": inputConfig = InputConfig() args.site = inputConfig.site print(colors.OKGREEN + "Running %d commands" % len(data['commands']) + colors.ENDC) # We can either do this locally, or on a grid if args.local: runLocalCommands(args, dirname, data['commands']) else: commandsToRun = data['commands'] if runMissing: # clean the non-needed commands uniqueCutStrings = [] for r in missingCutStrings: uniqueCutStrings.append(missingCutStrings[r]) uniqueCutStrings = set(uniqueCutStrings) missingCommands = [] for c in commandsToRun: print c[0] if c[0] not in uniqueCutStrings: continue missingCommands.append(c) commandsToRun = missingCommands runBatchCommands(args, dirname, commandsToRun, runMissing) # Keep a copy of the optimisation used in the output dir copiedFilename = os.path.join(dirname, os.path.basename(args.filename)) if not args.dry_run and os.path.abspath(args.filename) != os.path.abspath(copiedFilename): shutil.copyfile(args.filename, os.path.join(copiedFilename))
print("Loaded SRs generated with %s" % data['argv']) print("Generated at: %s" % datetime.datetime.fromtimestamp(data['timestamp']).strftime("%d/%m/%Y, %H:%M:%S")) print("") print(colors.OKBLUE + "Will run on grid: %s" % data['grid'] + colors.ENDC) print("Optimisation mode: %s" % data['mode']) print("Using the following points: %s" % ", ".join(data['points'])) if args.force: print("") print(colors.WARNING + "USING --force COULD POLLUTE YOUR OUTPUT DIRECTORY" + colors.ENDC) print("") if not args.local and args.site == "default": inputConfig = InputConfig() args.site = inputConfig.site print(colors.OKGREEN + "Running %d commands" % len(data['commands']) + colors.ENDC) # We can either do this locally, or on a grid if args.local: runLocalCommands(args, dirname, data['commands']) else: # TODO: here we initialise a class based on a pass grid name, which loads settings # from batch.cfg and can run all of it runBatchCommands(args, dirname, data['commands']) # Keep a copy of the optimisation used in the output dir copiedFilename = os.path.join(dirname, os.path.basename(args.filename)) if not args.dry_run and os.path.abspath(args.filename) != os.path.abspath(copiedFilename): shutil.copyfile(args.filename, os.path.join(copiedFilename))
args.site = inputConfig.site print(colors.OKGREEN + "Running %d commands" % len(data['commands']) + colors.ENDC) # We can either do this locally, or on a grid if args.local: runLocalCommands(args, dirname, data['commands']) else: commandsToRun = data['commands'] if runMissing: # clean the non-needed commands uniqueCutStrings = [] for r in missingCutStrings: uniqueCutStrings.append(missingCutStrings[r]) uniqueCutStrings = set(uniqueCutStrings) missingCommands = [] for c in commandsToRun: print c[0] if c[0] not in uniqueCutStrings: continue missingCommands.append(c) commandsToRun = missingCommands runBatchCommands(args, dirname, commandsToRun, runMissing) # Keep a copy of the optimisation used in the output dir copiedFilename = os.path.join(dirname, os.path.basename(args.filename)) if not args.dry_run and os.path.abspath( args.filename) != os.path.abspath(copiedFilename): shutil.copyfile(args.filename, os.path.join(copiedFilename))
args.site = inputConfig.site print(colors.OKGREEN + "Running %d commands" % len(data['commands']) + colors.ENDC) # We can either do this locally, or on a grid if args.local: runLocalCommands(args, dirname, data['commands']) else: commandsToRun = data['commands'] if runMissing: # clean the non-needed commands uniqueCutStrings = [] for r in missingCutStrings: uniqueCutStrings.append(missingCutStrings[r]) uniqueCutStrings = set(uniqueCutStrings) missingCommands = [] for c in commandsToRun: print c[0] if c[0] not in uniqueCutStrings: continue missingCommands.append(c) commandsToRun = missingCommands runBatchCommands(args, outputname, commandsToRun, runMissing) # Keep a copy of the optimisation used in the output dir copiedFilename = os.path.join(dirname, os.path.basename(args.filename)) if not args.dry_run and os.path.abspath( args.filename) != os.path.abspath(copiedFilename): shutil.copyfile(args.filename, os.path.join(copiedFilename))