Commit 69e16d0b authored by Brewer, Wes's avatar Brewer, Wes
Browse files

Separate out jobs based on partition to jobs1 and jobs2

parent e696c9a0
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -38,8 +38,14 @@ layout_manager2 = LayoutManager(args.layout, scheduler=sc2, debug=args.debug, **

wl = Workload(**config1)
jobs = getattr(wl, args.workload)(num_jobs=args.numjobs)
#print(jobs)
#exit()

# Separate jobs based on partition
jobs1 = [job for job in jobs if job['partition'] == 'setonix-cpu']
jobs2 = [job for job in jobs if job['partition'] == 'setonix-gpu']

# Print counts for verification
print(f"Jobs for setonix-cpu: {len(jobs1)}")
print(f"Jobs for setonix-gpu: {len(jobs2)}")

if args.time:
    timesteps = convert_to_seconds(args.time)
@@ -50,8 +56,8 @@ if args.verbose:
    print(jobs)

# Create generator objects for both partitions
gen1 = layout_manager1.run_nonblocking(jobs, timesteps=timesteps)
gen2 = layout_manager2.run_nonblocking(jobs, timesteps=timesteps)
gen1 = layout_manager1.run_nonblocking(jobs1, timesteps=timesteps)
gen2 = layout_manager2.run_nonblocking(jobs2, timesteps=timesteps)

# Step through both generators in lockstep
for _ in range(timesteps):
+2 −1
Original line number Diff line number Diff line
@@ -354,7 +354,8 @@ class Scheduler:
        for timestep in range(timesteps):
            # Print the current timestep for this partition
            if timestep % self.config['UI_UPDATE_FREQ'] == 0:
                print(f"[DEBUG] {self.config['system_name']} - Timestep {timestep} - Jobs in queue: {len(self.queue)}")
                sys_util = self.sys_util_history[-1][1] if self.sys_util_history else 0
                print(f"[DEBUG] {self.config['system_name']} - Timestep {timestep} - Jobs in queue: {len(self.queue)} - Utilization: {sys_util:.1f}%")

            while self.current_time >= last_submit_time and jobs:
                job = jobs.pop(0)