Commit 2c4a714a authored by Brewer, Wes's avatar Brewer, Wes
Browse files

Add --scale parameter for scaling telemetry to work on other systems

parent fbde139a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ parser.add_argument('-p', '--plot', nargs='+', choices=['power', 'loss', 'pue',
                    help='Specify one or more types of plots to generate: power, loss, pue, util, temp')
choices = ['png', 'svg', 'jpg', 'pdf', 'eps']
parser.add_argument('--imtype', type=str, choices=choices, default=choices[0], help='Plot image type')
parser.add_argument('--scale', type=int, default=0, help='Scale telemetry to fit on target system/partition (currently only suupported for marconi100 data)')
parser.add_argument('--system', type=str, default='frontier', help='System config to use')
choices = [policy.value for policy in PolicyType]
parser.add_argument('-s', '--schedule', type=str, choices=choices, default=choices[0], help='Schedule policy to use')
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
    "JOB_ARRIVAL_TIME": 900,
    "MTBF": 11,
    "MAX_TIME": 88200,
    "TRACE_QUANTA": 15,
    "TRACE_QUANTA": 20,
    "MIN_WALL_TIME": 3600,
    "MAX_WALL_TIME": 43200,
    "UI_UPDATE_FREQ": 900,
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
    "JOB_ARRIVAL_TIME": 900,
    "MTBF": 11,
    "MAX_TIME": 88200,
    "TRACE_QUANTA": 15,
    "TRACE_QUANTA": 20,
    "MIN_WALL_TIME": 3600,
    "MAX_WALL_TIME": 43200,
    "UI_UPDATE_FREQ": 900,
+2 −1
Original line number Diff line number Diff line
@@ -87,9 +87,10 @@ if args.replay:
        print(f"Loading {args.replay[0]}...")
        jobs = td.load_snapshot(args.replay[0])
        if args.reschedule:
            print("available nodes:", config['AVAILABLE_NODES'])
            for job in tqdm(jobs, desc="Updating requested_nodes"):
                job['requested_nodes'] = None
                job['submit_time'] = next_arrival()
                job['submit_time'] = next_arrival(1 / config['JOB_ARRIVAL_TIME'])
    else:
        print(*args.replay)
        jobs = td.load_data(args.replay)
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@

"""
import uuid
import random
import pandas as pd
from tqdm import tqdm

@@ -62,6 +63,7 @@ def load_data_from_df(jobs_df: pd.DataFrame, **kwargs):
    fastforward = kwargs.get('fastforward')
    validate = kwargs.get('validate')
    jid = kwargs.get('jid', '*')
    scale = kwargs.get('scale')

    if fastforward: print(f"fast-forwarding {fastforward} seconds")

@@ -148,6 +150,8 @@ def load_data_from_df(jobs_df: pd.DataFrame, **kwargs):
        else: # Prescribed replay
            scheduled_nodes = (jobs_df.loc[jidx, 'nodes']).tolist()
            
        if scale > 0: nodes_required = random.randint(1, scale)

        if gpu_trace.size > 0 and time_offset >= 0:
            job_info = job_dict(nodes_required, name, cpu_trace, gpu_trace, [], [], wall_time,
                                end_state, scheduled_nodes, time_offset, job_id, priority)
Loading