Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #83

Merged
merged 28 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2776783
Update gridtools
iomaganaris Feb 12, 2024
4c286cb
Fix warnings with deprecated API
iomaganaris Feb 12, 2024
e683db6
Use updated ghex
iomaganaris Feb 13, 2024
430a8a9
Make clang-format happy
iomaganaris Feb 14, 2024
3edacde
Make clang-format happier
iomaganaris Feb 14, 2024
323919b
Use commit from latest master of ghex
iomaganaris Feb 16, 2024
0f0cc4e
Fix gridtools not found by ghex
iomaganaris Feb 16, 2024
fb70bab
Avoid using cache in docker
iomaganaris Feb 26, 2024
b5e7390
Update pybind11
iomaganaris Feb 26, 2024
83f277b
Update cmake
iomaganaris Feb 26, 2024
5d993a4
Fix cmake url
iomaganaris Feb 26, 2024
f613cee
Fix cmake installation
iomaganaris Feb 26, 2024
38740e8
Fix cmake url
iomaganaris Feb 26, 2024
774f17c
Revert "Avoid using cache in docker"
iomaganaris Feb 26, 2024
b113e9e
Added script to build all the different variations for GH200
iomaganaris Feb 26, 2024
a76896f
Uncomment cmake build
iomaganaris Feb 26, 2024
615fbac
Fix indentation
iomaganaris Feb 26, 2024
8d77bc1
Add XPMEM and LIBFABRIC directories in the beginning of the script
iomaganaris Feb 27, 2024
3a9e153
Fix GPU compilation
iomaganaris Feb 27, 2024
df16b2c
Fix boost and ucx finding
iomaganaris Feb 27, 2024
87c2919
Initial plot scripts
iomaganaris Feb 28, 2024
3193a35
Fix element per second graph
iomaganaris Feb 28, 2024
f34e633
Use x axis values as xticks
iomaganaris Feb 28, 2024
b2e5dc9
Apply suggestions from code review
iomaganaris Jun 10, 2024
5ab91fc
Merge remote-tracking branch 'origin/ioannmag/update_gridtools' into …
iomaganaris Jun 10, 2024
38ee20e
Remove GH200 build script
iomaganaris Jun 10, 2024
5c3b9a6
Update GHEX version to v0.4.0
iomaganaris Jun 10, 2024
8df5162
Remove plotting utilities
iomaganaris Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Initial plot scripts
  • Loading branch information
iomaganaris committed Feb 28, 2024
commit 87c29194fd29eed9b054b9cfe51ee9c7e227a56b
27 changes: 27 additions & 0 deletions gen_horsweep_plots.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from plot_utilities import create_plot, parse_input_file

def create_time_plot(data, labels, output_name):
create_plot(data, labels, output_name, 'GTBENCH Median Runtime with 95% Confidence Intervals', 'Domain size', 'Median runtime', 'Median Time 95% Confidence Upper', 'Median Time 95% Confidence Lower', 'Domain Size (NxNx64)', 'Median Runtime')

def create_columns_plot(data, labels, output_name):
create_plot(data, labels, output_name, 'GTBENCH Columns per Second with 95% Confidence Intervals', 'Domain size', 'Columns per Second', 'Columns per Second 95% Confidence Upper', 'Columns per Second 95% Confidence Lower', 'Domain Size (NxNx64)', 'Columns per Second')

def create_elements_plot(data, labels, output_name):
create_plot(data, labels, output_name, 'GTBENCH Elements per Second with 95% Confidence Intervals', 'Domain size', 'Elements per Second', 'Elements per Second 95% Confidence Upper', 'Elements per Second 95% Confidence Lower', 'Domain Size (NxNx64)', 'Elements per Second')


data = {}

systems = ["GH200"]
input_files = ["cpu_ihorswp.out", "cpu_khorswp.out"]
labels = ["cpu_ifirst", "cpu_kfirst"]

for system in systems:
data[system] = {}
for file, variant in zip(input_files, labels):
data[system][variant] = parse_input_file(file)
print(data[system][variant])

create_time_plot(data, systems, "santis_time_horswp.png")
create_columns_plot(data, systems, "santis_columns_horswp.png")
create_elements_plot(data, systems, "santis_elements_horswp.png")
96 changes: 96 additions & 0 deletions plot_utilities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import re
import math

def parse_input_file(file_path):
# Initialize dictionaries to store the parsed data
domain_data = {
'Domain size': [],
'Median runtime': [],
'Median Time 95% Confidence Lower': [],
'Median Time 95% Confidence Upper': [],
'Columns per Second': [],
'Columns per Second 95% Confidence Lower': [],
'Columns per Second 95% Confidence Upper': [],
'Elements per Second': [],
'Elements per Second 95% Confidence Lower': [],
'Elements per Second 95% Confidence Upper': []
}

# Read the file
with open(file_path, 'r') as file:
lines = file.readlines()

# Regular expressions to extract relevant information
domain_size_pattern = re.compile(r'Domain size:\s+(\d+)x(\d+)x(\d+)')
median_time_pattern = re.compile(r'Median time:\s+(\d+(?:\.\d+)?)s \(95% confidence: (\d+(?:\.\d+)?)s - (\d+(?:\.\d+)?)s\)')
cols_per_second_pattern = re.compile(r'Columns per second:\s+(\d+(?:\.\d+)?) \(95% confidence: (\d+(?:\.\d+)?) - (\d+(?:\.\d+)?)\)')

# Parsing the file content
current_domain_size = None
for line in lines:
domain_size_match = domain_size_pattern.search(line)
median_time_match = median_time_pattern.search(line)
cols_per_second_match = cols_per_second_pattern.search(line)

if domain_size_match:
current_domain_size = domain_size_match.group(1)
elif median_time_match and current_domain_size:
median_time = float(median_time_match.group(1))
conf_lower = float(median_time_match.group(2))
conf_upper = float(median_time_match.group(3))
domain_data['Domain size'].append(int(current_domain_size))
domain_data['Median runtime'].append(median_time)
domain_data['Median Time 95% Confidence Lower'].append(conf_lower)
domain_data['Median Time 95% Confidence Upper'].append(conf_upper)
elif cols_per_second_match and current_domain_size:
cols_per_second = float(cols_per_second_match.group(1))
conf_lower = float(cols_per_second_match.group(2))
conf_upper = float(cols_per_second_match.group(3))
domain_data['Columns per Second'].append(cols_per_second)
domain_data['Columns per Second 95% Confidence Lower'].append(conf_lower)
domain_data['Columns per Second 95% Confidence Upper'].append(conf_upper)
domain_data['Elements per Second'].append(cols_per_second/int(current_domain_size))
domain_data['Elements per Second 95% Confidence Lower'].append(conf_lower/int(current_domain_size))
domain_data['Elements per Second 95% Confidence Upper'].append(conf_upper/int(current_domain_size))

return domain_data

def create_plot(data, labels, output_name, title, x_key, y_key, upper_key, lower_key, xlabel, ylabel, xscale='linear', yscale='linear'):
min_x = 0
max_x = 0
# Plotting with for loop
plt.figure(figsize=(10, 6))
for idx, (cpu, cpu_data) in enumerate(data.items()):
for idx2, (key, value) in enumerate(cpu_data.items()):
df = pd.DataFrame(value)
min_x = min(df[x_key])
max_x = max(df[x_key])
sns.lineplot(data=df, x=x_key, y=y_key, marker='o', label=labels[idx] + ' ' + key)
plt.errorbar(df[x_key], df[y_key], yerr=[df[y_key] - df[lower_key], df[upper_key] - df[y_key]], fmt='o', capsize=5)

# Setting labels and title
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title)

# Setting the scale to linear for the y-axis
plt.yscale(yscale)

# Displaying the plot
plt.xscale(xscale)

# plt.xticks([16, 32, 64, 128, 256, 512, 1024], rotation=0, fontsize=7)
# Dynamically determining the range of xticks
min_pow = math.floor(math.log2(min_x))
max_pow = math.ceil(math.log2(max_x))
xticks = [2 ** i for i in range(min_pow, max_pow + 1)]
plt.xticks(xticks)

plt.grid(True)
plt.legend()
# plt.show()
plt.savefig(output_name, dpi=300)