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
......@@ -33,7 +33,6 @@ def cube_alloc(job_ranks, total_nodes):
row.append(i+offset)
layer += row
cube += layer
print "list length is", len(cube), cube
f = open('cube_allc_linear.conf','w')
for rankid in range(len(cube)):
......@@ -60,7 +59,6 @@ def permeate_alloc(job_ranks, total_nodes):
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.sort()
print "length of alloc list", len(alloc_list), "\n", alloc_list,"\n"
for idx in range(len(alloc_list)):
f.write("%s " % alloc_list[idx])
f.write("\n")
......@@ -73,7 +71,6 @@ def random_alloc(job_rank, total_nodes):
for rankid in range(len(job_rank)):
alloc_list = random.sample(node_list, job_rank[rankid])
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)):
f.write("%s " % alloc_list[idx])
f.write("\n")
......@@ -113,22 +110,22 @@ def stripe_alloc(job_ranks, total_nodes):
def policy_select(plcy, job_ranks, total_nodes):
if plcy == "CONT":
print "contiguous alloction!"
print("contiguous alloction!")
contiguous_alloc(job_ranks, total_nodes)
elif plcy == "rand":
print "random allocation!"
print("random allocation!")
random_alloc(job_ranks, total_nodes)
elif plcy == "STRIPE":
print "stripe allcation!"
print("stripe allcation!")
stripe_alloc(job_ranks, total_nodes)
elif plcy == "PERMEATE":
print "permeate allocation!"
print("permeate allocation!")
permeate_alloc(job_ranks, total_nodes)
elif plcy == "CUBE":
print "cube allocation!"
print("cube allocation!")
cube_alloc(job_ranks, total_nodes)
else:
print "NOT Supported yet!"
print("NOT Supported yet!")
if __name__ == "__main__":
......@@ -142,8 +139,8 @@ if __name__ == "__main__":
f.close()
alloc_plcy = array.pop(0)
total_nodes = array.pop(0)
print alloc_plcy
print(alloc_plcy)
array = map(int, array)
print array
print(array)
policy_select(alloc_plcy, array, total_nodes)
......@@ -2,7 +2,7 @@ LPGROUPS
{
MODELNET_GRP
{
repetitions="27";
repetitions="256";
modelnet_simplenet="1";
nw-lp="1";
}
......
......@@ -227,7 +227,6 @@ void codes_workload_get_next(
return;
}
/* ask generator for the next operation */
method_array[wkld_id]->codes_workload_get_next(app_id, rank, op);
assert(op->op_type);
......@@ -253,7 +252,7 @@ void codes_workload_get_next_rc(
}
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);
tmp_op->op = *op;
tmp_op->next = tmp->lifo;
......
......@@ -25,7 +25,7 @@
#define ALLREDUCE_SHORT_MSG_SIZE 2048
#define DBG_COMM 0
//#define DBG_COMM 0
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