Commit e0a1d00f authored by Misbah Mubarak's avatar Misbah Mubarak

merging with current mpi-sim version

parent d9375649
rand CONT
8832 3456
2 2
1 1
1024 7500 1024 128
...@@ -30,7 +30,6 @@ def cube_alloc(job_ranks, total_nodes): ...@@ -30,7 +30,6 @@ def cube_alloc(job_ranks, total_nodes):
row.append(i+offset) row.append(i+offset)
layer += row layer += row
cube += layer cube += layer
print "list length is", len(cube), cube
f = open('cube_allc_linear.conf','w') f = open('cube_allc_linear.conf','w')
for rankid in range(len(cube)): for rankid in range(len(cube)):
...@@ -57,7 +56,6 @@ def permeate_alloc(job_ranks, total_nodes): ...@@ -57,7 +56,6 @@ def permeate_alloc(job_ranks, total_nodes):
permeate_list = node_list[num_rank*permeate_area: (num_rank+1)*permeate_area] permeate_list = node_list[num_rank*permeate_area: (num_rank+1)*permeate_area]
alloc_list = random.sample(permeate_list, job_ranks[num_rank]) alloc_list = random.sample(permeate_list, job_ranks[num_rank])
alloc_list.sort() alloc_list.sort()
print "length of alloc list", len(alloc_list), "\n", alloc_list,"\n"
for idx in range(len(alloc_list)): for idx in range(len(alloc_list)):
f.write("%s " % alloc_list[idx]) f.write("%s " % alloc_list[idx])
f.write("\n") f.write("\n")
...@@ -70,7 +68,6 @@ def random_alloc(job_rank, total_nodes): ...@@ -70,7 +68,6 @@ def random_alloc(job_rank, total_nodes):
for rankid in range(len(job_rank)): for rankid in range(len(job_rank)):
alloc_list = random.sample(node_list, job_rank[rankid]) alloc_list = random.sample(node_list, job_rank[rankid])
node_list = [i for i in node_list if (i not in alloc_list)] node_list = [i for i in node_list if (i not in alloc_list)]
print "length of alloc list", len(alloc_list), "\n", alloc_list,"\n"
for idx in range(len(alloc_list)): for idx in range(len(alloc_list)):
f.write("%s " % alloc_list[idx]) f.write("%s " % alloc_list[idx])
f.write("\n") f.write("\n")
...@@ -110,22 +107,22 @@ def stripe_alloc(job_ranks, total_nodes): ...@@ -110,22 +107,22 @@ def stripe_alloc(job_ranks, total_nodes):
def policy_select(plcy, job_ranks, total_nodes): def policy_select(plcy, job_ranks, total_nodes):
if plcy == "CONT": if plcy == "CONT":
print "contiguous alloction!" print("contiguous alloction!")
contiguous_alloc(job_ranks, total_nodes) contiguous_alloc(job_ranks, total_nodes)
elif plcy == "rand": elif plcy == "rand":
print "random allocation!" print("random allocation!")
random_alloc(job_ranks, total_nodes) random_alloc(job_ranks, total_nodes)
elif plcy == "STRIPE": elif plcy == "STRIPE":
print "stripe allcation!" print("stripe allcation!")
stripe_alloc(job_ranks, total_nodes) stripe_alloc(job_ranks, total_nodes)
elif plcy == "PERMEATE": elif plcy == "PERMEATE":
print "permeate allocation!" print("permeate allocation!")
permeate_alloc(job_ranks, total_nodes) permeate_alloc(job_ranks, total_nodes)
elif plcy == "CUBE": elif plcy == "CUBE":
print "cube allocation!" print("cube allocation!")
cube_alloc(job_ranks, total_nodes) cube_alloc(job_ranks, total_nodes)
else: else:
print "NOT Supported yet!" print("NOT Supported yet!")
if __name__ == "__main__": if __name__ == "__main__":
...@@ -139,8 +136,8 @@ if __name__ == "__main__": ...@@ -139,8 +136,8 @@ if __name__ == "__main__":
f.close() f.close()
alloc_plcy = array.pop(0) alloc_plcy = array.pop(0)
total_nodes = array.pop(0) total_nodes = array.pop(0)
print alloc_plcy print(alloc_plcy)
array = map(int, array) array = map(int, array)
print array print(array)
policy_select(alloc_plcy, array, total_nodes) policy_select(alloc_plcy, array, total_nodes)
...@@ -2,7 +2,7 @@ LPGROUPS ...@@ -2,7 +2,7 @@ LPGROUPS
{ {
MODELNET_GRP MODELNET_GRP
{ {
repetitions="27"; repetitions="256";
modelnet_simplenet="1"; modelnet_simplenet="1";
nw-lp="1"; nw-lp="1";
} }
......
/* /*
* Copyright (C) 2014 University of Chicago. * Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory. * See COPYRIGHT notice in top-level directory.
* *
*/ */
...@@ -434,7 +434,7 @@ static void update_message_size( ...@@ -434,7 +434,7 @@ static void update_message_size(
tmp->num_msgs++; tmp->num_msgs++;
tmp->agg_latency += tw_now(lp) - msg_init_time; tmp->agg_latency += tw_now(lp) - msg_init_time;
tmp->avg_latency = (tmp->agg_latency / tmp->num_msgs); tmp->avg_latency = (tmp->agg_latency / tmp->num_msgs);
// printf("\n Msg size %d aggregate latency %f num messages %d ", qitem->num_bytes, tmp->agg_latency, tmp->num_msgs); // printf("\n Msg size %lld aggregate latency %f num messages %d ", qitem->num_bytes, tmp->agg_latency, tmp->num_msgs);
} }
} }
static void notify_background_traffic_rc( static void notify_background_traffic_rc(
...@@ -2560,6 +2560,7 @@ const tw_optdef app_opt [] = ...@@ -2560,6 +2560,7 @@ const tw_optdef app_opt [] =
TWOPT_CHAR("alloc_file", alloc_file, "allocation file name"), TWOPT_CHAR("alloc_file", alloc_file, "allocation file name"),
TWOPT_CHAR("workload_conf_file", workloads_conf_file, "workload config file name"), TWOPT_CHAR("workload_conf_file", workloads_conf_file, "workload config file name"),
TWOPT_UINT("num_net_traces", num_net_traces, "number of network traces"), TWOPT_UINT("num_net_traces", num_net_traces, "number of network traces"),
TWOPT_UINT("payload_sz", payload_sz, "size of payload for synthetic traffic "),
TWOPT_UINT("eager_threshold", EAGER_THRESHOLD, "the transition point for eager/rendezvous protocols (Default 8192)"), TWOPT_UINT("eager_threshold", EAGER_THRESHOLD, "the transition point for eager/rendezvous protocols (Default 8192)"),
TWOPT_UINT("disable_compute", disable_delay, "disable compute simulation"), TWOPT_UINT("disable_compute", disable_delay, "disable compute simulation"),
TWOPT_UINT("payload_sz", payload_sz, "size of the payload for synthetic traffic"), TWOPT_UINT("payload_sz", payload_sz, "size of the payload for synthetic traffic"),
...@@ -2790,7 +2791,6 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv ) ...@@ -2790,7 +2791,6 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
mean_interval, mean_interval,
rand()); rand());
msg_size_log = fopen(log_name, "w+"); msg_size_log = fopen(log_name, "w+");
if(!msg_size_log) if(!msg_size_log)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment