-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
32 changed files
with
3,183 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule galois
updated
12 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
# Copyright (c) 2023. University of Texas at Austin. All rights reserved. | ||
|
||
##### Inputs ##### | ||
# hosts = [8, 16, 32, 64] | ||
# scales = ["31", "31", "31", "31"] | ||
hosts = [8, 16, 32, 16, 32, 8, 16, 32] | ||
scales = ["1", "1", "1", "2", "2", "3", "3", "3"] | ||
|
||
|
||
|
||
##### Parameters ##### | ||
data_size = 8 | ||
id_size = 8 | ||
addr_size = 8 | ||
|
||
|
||
|
||
##### Processing ##### | ||
for i, host in enumerate(hosts): | ||
scale = scales[i] | ||
|
||
local_read = [] | ||
master_read = [] | ||
master_write = [] | ||
mirror_read = [] | ||
mirror_write = [] | ||
dirty_mirror_to_remote = [] | ||
|
||
for host_id in range(host): | ||
local_read.append([]) | ||
master_read.append([]) | ||
master_write.append([]) | ||
mirror_read.append([]) | ||
mirror_write.append([]) | ||
dirty_mirror_to_remote.append([]) | ||
|
||
round_curr = -1 | ||
round_total = 0 | ||
|
||
filename = "scale" + scale + "_" + str(host) + "procs_id" + str(host_id) | ||
f = open(filename, "r") | ||
lines = f.readlines() | ||
|
||
for row in lines: | ||
if row.find('##### Round') != -1: | ||
row_split = row.strip().split() | ||
round_curr += 1 | ||
round_total += 1 | ||
|
||
local_read[host_id].append([]) | ||
master_read[host_id].append([]) | ||
master_write[host_id].append([]) | ||
mirror_read[host_id].append([]) | ||
mirror_write[host_id].append([]) | ||
dirty_mirror_to_remote[host_id].append([-1 for i in range(host)]) | ||
elif row.find('local read (stream)') != -1: | ||
row_split = row.strip().split() | ||
num = row_split[5] | ||
local_read[host_id][round_curr] = int(num) | ||
elif row.find('master reads') != -1: | ||
row_split = row.strip().split() | ||
num = row_split[4] | ||
master_read[host_id][round_curr] = int(num) | ||
elif row.find('master writes') != -1: | ||
row_split = row.strip().split() | ||
num = row_split[4] | ||
master_write[host_id][round_curr] = int(num) | ||
elif row.find('mirror reads') != -1: | ||
row_split = row.strip().split() | ||
num = row_split[4] | ||
mirror_read[host_id][round_curr] = int(num) | ||
elif row.find('mirror writes') != -1: | ||
row_split = row.strip().split() | ||
num = row_split[4] | ||
mirror_write[host_id][round_curr] = int(num) | ||
elif row.find('remote communication for') != -1: | ||
row_split = row.strip().split() | ||
to_host = int(row_split[6][:-1]) | ||
num = row_split[7] | ||
dirty_mirror_to_remote[host_id][round_curr][to_host] = int(num) | ||
|
||
f.close() | ||
|
||
filename = "GAL_WF4_" + str(host) + "_1_" + scale + ".stats" | ||
f = open(filename, "w") | ||
|
||
for round_num in range(round_total): | ||
f.write("BSP " + str(2*round_num) + "\n") | ||
|
||
for src in range(host): | ||
for dst in range(host): | ||
if (src == dst): # only local in compute phase` | ||
stream_read = local_read[src][round_num] | ||
stream_read_bytes = stream_read * addr_size | ||
|
||
random_read = master_read[src][round_num] + mirror_read[src][round_num] | ||
random_read_bytes = random_read * data_size | ||
|
||
random_write = master_write[src][round_num] + mirror_write[src][round_num] | ||
random_write_bytes = random_write * data_size | ||
|
||
if stream_read != 0 or random_read != 0 or random_write != 0: | ||
f.write("# " + str(src) + " " + str(dst) + "\n") | ||
|
||
if stream_read != 0: | ||
f.write("STR RD " + str(stream_read) + " " + str(stream_read_bytes) + "\n") | ||
|
||
if random_read != 0: | ||
f.write("RND RD " + str(random_read) + " " + str(random_read_bytes) + "\n") | ||
|
||
if random_write != 0: | ||
f.write("RND WR " + str(random_write) + " " + str(random_write_bytes) + "\n") | ||
|
||
f.write("\n") | ||
|
||
f.write("BSP " + str(2*round_num+1) + "\n") | ||
|
||
for src in range(host): | ||
for dst in range(host): | ||
if (src != dst): # only remote in communication phase | ||
random_write = dirty_mirror_to_remote[src][round_num][dst] | ||
random_write_bytes = random_write * data_size | ||
|
||
if random_write != 0: | ||
f.write("# " + str(src) + " " + str(dst) + "\n") | ||
f.write("RND RMW " + str(random_write) + " " + str(random_write_bytes) + "\n") | ||
|
||
f.write("\n") | ||
|
||
f.close() |
Oops, something went wrong.