Commit cacd55b9 authored by Neil McGlohon's avatar Neil McGlohon

Merge branch 'workloads' of xgitlab.cels.anl.gov:codes/codes into dfp-online-workloads

parents a0f83d31 af00f056
rand CONT
8832 3456
2 2
1 1
1024 7500 1024 128
...@@ -33,7 +33,6 @@ def cube_alloc(job_ranks, total_nodes): ...@@ -33,7 +33,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)):
...@@ -60,7 +59,6 @@ def permeate_alloc(job_ranks, total_nodes): ...@@ -60,7 +59,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")
...@@ -73,7 +71,6 @@ def random_alloc(job_rank, total_nodes): ...@@ -73,7 +71,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")
...@@ -113,22 +110,22 @@ def stripe_alloc(job_ranks, total_nodes): ...@@ -113,22 +110,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__":
...@@ -142,8 +139,8 @@ if __name__ == "__main__": ...@@ -142,8 +139,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";
} }
......
...@@ -227,7 +227,6 @@ void codes_workload_get_next( ...@@ -227,7 +227,6 @@ void codes_workload_get_next(
return; return;
} }
/* ask generator for the next operation */
method_array[wkld_id]->codes_workload_get_next(app_id, rank, op); method_array[wkld_id]->codes_workload_get_next(app_id, rank, op);
assert(op->op_type); assert(op->op_type);
...@@ -253,7 +252,7 @@ void codes_workload_get_next_rc( ...@@ -253,7 +252,7 @@ void codes_workload_get_next_rc(
} }
assert(tmp); assert(tmp);
tmp_op = (struct rc_op*)calloc(1, sizeof(*tmp_op)); tmp_op = (struct rc_op*)malloc(sizeof(struct rc_op));
assert(tmp_op); assert(tmp_op);
tmp_op->op = *op; tmp_op->op = *op;
tmp_op->next = tmp->lifo; tmp_op->next = tmp->lifo;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define ALLREDUCE_SHORT_MSG_SIZE 2048 #define ALLREDUCE_SHORT_MSG_SIZE 2048
#define DBG_COMM 0 //#define DBG_COMM 0
using namespace std; using namespace std;
......
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