Beispiel #1
0
def main():
    # Get DataFrame of All Experiments
    df = getAllExperiments()

    # Get Only Runs from Experiment 15
    df_filtered = df[df['Experiment'] == 15]

    # Get Specific Run - No Rabbit Workload and No Stencil and 8 ppn on 2 nodes
    df_filtered = df_filtered[df_filtered['cores'] == 8]
    df_filtered = df_filtered[df_filtered['processors'] == 16] # 2 Nodes
    df_filtered = df_filtered[df_filtered['rabbit_workload'] == 0]
    df_filtered = df_filtered[df_filtered['stencil_size'] == 0]
    print(df_filtered)

    # Get Data from Specific Run
    data = getData(df_filtered)
    print(data.head())

    # Get Data Only from Rank 0
    data_rank0 = data[data['rank'] == 0]

    # Find Shape, Location, and Scale of Max Data
    shape, loc, scale = gevfit.fit(data_rank0['workload_max_usec'])
    print("Shape: ", shape, "\tLocation: ", loc, "\tScale: ", scale)

    # Get Overall Runtime
    runtime0 = data_rank0['interval_max_usec'].sum()
    dist = stats.genextreme(shape, loc, scale)
    print("Runtime: ", runtime0, "Microseconds at Initial ", data['comm_size'].iloc[0], " Ranks")

    # Projected Runtime at k = 8 -> 128 ranks (16 nodes)
    projected = emma(dist, 8) * data['iterations'].iloc[0]
    print("K = 8: Projected Runtime: ", projected, "\tProjected Efficiency: ", runtime0 / projected)

    # Get Projected Scale of When Efficiency Reaches 50%
    eh = ehalf(runtime0, data['comm_size'].iloc[0], dist, data['iterations'].iloc[0])
    print("Expect 50% Efficiency at: ", eh, " Ranks")
def gev_project2(maxes, k):
    project_samples = [ max(resample(maxes, n_samples=k, replace=False)) for _ in range(k*len(maxes))]
    return gevfit.fit(project_samples)
def gev_project(params, k, samples=1000):
    shape, loc, scale = params
    project_samples = [ max(genextreme.rvs(shape, loc, scale, k)) for x in range(k*samples)]
    return gevfit.fit(project_samples)

#s = np.random.normal(loc=5.0, scale=1.0, size=(_PROJ_NNODES,_NRANKS,_NITER))
# add per node disturbances


# compute stats for all thr workload
sall=np.reshape(s, (-1,_NITER)) 
# get maxima
all_max=np.amax(sall, axis=0)
all_workload=np.sum(all_max)
print("all workload {}".format(all_workload))

all_reshape=np.reshape(all_max,(-1,1))
print(all_reshape.shape)
all_gev = gevfit.fit(all_reshape)
print("all gev {}".format(all_gev))
all_pwm = pwm_fit(all_reshape)
print("all pwm {}".format(all_pwm))
all_mom = mom_fit(all_reshape)
print("all mom {}".format(all_mom))


s1=s[0:_NNODES,0:_NRANKS,0:_NITER]
sone=np.reshape(s1, (-1,_NITER)) 
one_workload=np.sum(np.amax(sone, axis=0))
print("one workload no B {}".format(one_workload))
    
sone=np.reshape(s1, (-1,1)) 

Beispiel #5
0
def gev_resample_project(samples, nsamples, k):
    shape, loc, scale = gevfit.fit(samples)
    return [max(genextreme.rvs(shape, loc, scale, k)) for x in range(nsamples)]