Exemple #1
0
                    demote_list.remove(job)

    ################ check step1 finished job of K80 jobs and step 2 of V100 #################

    check_step1_complete(list(V100_job.values()))
    check_step2_complete(list(K80_job.values()))

    for gpu, job in V100_job.items():
        if job not in qualified_job and job != 'idle':
            if job in step1_job:
                real_node, real_gpu = V100_LUT(gpu)
                kill_job(real_node, job)
                qualified_job.append(job)
                print('job' + job + ' has been qualified for demotion')
                time.sleep(3)  # wait for run.sh to finish
                x1, x3 = gpu_pwr.process_csv('job' + job, testcase)
                x2 = 3600 / V100_epoch_time[job]
                # preprocess the data
                x1 = (x1 - min(x1_data)) / (max(x1_data) - min(x1_data))
                x2 = (x2 - min(x2_data)) / (max(x2_data) - min(x2_data))
                x3 = (x3 - min(x3_data)) / (max(x3_data) - min(x3_data))
                speedup_pred = model.predict(
                    np.array([x1, x2, x3]).reshape((1, -1)))[0] / 100
                speedup_dict[job] = speedup_pred
                predict_dict[job] = speedup_pred

    ############### record number of newly arrived jobs ################

    new_arrival = 0
    index_cpy = index
    while True:
Exemple #2
0
                if job in demote_list:
                    demote_list.remove(job)

    ################ check step1 finished job of K80 jobs and step 2 of V100 #################

    check_step1_complete(list(V100_job.values()))
    check_step2_complete(list(K80_job.values()))

    for job in list(V100_job.values()):
        if job not in qualified_job and job != 'idle':
            if job in step1_job:
                kill_job(V100_node, job)
                qualified_job.append(job)
                print('job' + job + ' has been qualified for demotion')
                time.sleep(3)  # wait for run.sh to finish
                x1, x3 = gpu_pwr.process_csv('job' + job)
                x2 = 3600 / V100_epoch_time[job]
                speedup_pred = model.predict(
                    np.array([x1, x2, x3]).reshape((1, -1)))[0] / 100
                speedup_dict[job] = speedup_pred
                predict_dict[job] = speedup_pred

    ############### record number of newly arrived jobs ################

    new_arrival = 0
    index_cpy = index
    while True:
        time_passed = int(time.time() - queue_timer)
        if index_cpy >= len(queue):
            break
        elif time_passed >= queue_dict[queue[index_cpy]]: