-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecrecy_plot.py
More file actions
31 lines (22 loc) · 783 Bytes
/
secrecy_plot.py
File metadata and controls
31 lines (22 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
"""secrecy_plot.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1P1etAPJRJ2MjQhgrJRX_mzwsj0LoRUEh
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import subprocess
with open('tcp_timing.txt', 'r') as f:
lines = (line.strip() for line in f if line)
TCP_data = [float(line) for line in lines]
with open('mpi_timing.txt', 'r') as f:
lines = (line.strip() for line in f if line)
TCP_data = [float(line) for line in lines]
print(MPI_data, TCP_data)
num_elements = [1024, 4096, 16384, 65536, 262144, 1048576]
plt.plot(num_elements, MPI_data, label='MPI')
plt.plot(num_elements,TCP_data, label='TCP')
plt.legend()
plt.savefig("timingplot.png")