for i in range(0, options.nodes): simulator.nodes['sol%03d' % i] = Node('sol%03d' % i) simulator.nodes['sol%03d' % i].numMaps = options.mapslot simulator.nodes['sol%03d' % i].redMaps = options.redslot ''' # Set some servers to start sleeping for i in range(4, 8): simulator.nodes['sol%03d' % i].status = 'SLEEP' ''' # Test #unit_test() # Add jobs if len(options.infile) > 0: simulator.nodeManagement = options.manage manager = WorkloadManager(options.infile) weights = {} weights = parseSchedule(options.weight) for job in manager.getJobs(): job.approxAlgoMapVal = options.approx # Approximate X% of the maps job.approxDropMapVal = options.drop # Drop X% of the maps if len(weights)>0: job.priority=getProbBySchedule(weights, job.nreds) else: job.priority=getProbabilisticSJF(job.nreds, options.sjf) simulator.addJob(job) ''' manager.initManager(options.infile) if options.sjf > 0.0: manager.applySJFPriority(options.sjf)