import random NET_SIZE_X = 4 NET_SIZE_Y = 4 NET_SIZE_Z = 1 NUM_TASKS = 84 REPEAT = 2 MAP_START = """ """ BIND = """ """ MAP_END = "" NUM_NODES = NET_SIZE_X*NET_SIZE_Y*NET_SIZE_Z print(MAP_START) count = 0 for i in range(NUM_TASKS): #node_id = random.randint(0, NUM_NODES-1) node_id = count if ((i+1) % REPEAT) == 0: count += 1 if count >= NUM_NODES: count = 0 print(BIND.format(i, node_id)) print(MAP_END)