From c5be9e74d4fe1cf77a1dbe01f9253775d372c28d Mon Sep 17 00:00:00 2001
From: Aidan Chalk <aidan.chalk@stfc.ac.uk>
Date: Wed, 19 Apr 2017 19:54:09 +0100
Subject: [PATCH] Makeplots script added

---
 paper/figures/mkplots.m | 78 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100755 paper/figures/mkplots.m

diff --git a/paper/figures/mkplots.m b/paper/figures/mkplots.m
new file mode 100755
index 0000000..75eec96
--- /dev/null
+++ b/paper/figures/mkplots.m
@@ -0,0 +1,78 @@
+bh = zeros(64,2);
+bh(:,2) = importdata('C:\Users\zcl92831\Desktop\From_desktop\quicksched\bh_results.txt');
+bh(:,1) = [1:64];
+
+clf;
+speedup = bh(1,2) ./ bh(:,2);
+efficiency = bh(1,2) ./ bh(:,1);
+efficiency = efficiency ./ bh(:,2);
+
+
+subplot('position',[ 0.05 , 0.1 , 0.3 , 0.8 ]);
+hold on
+
+plot(bh(:,1), speedup(:) ,'-k','LineWidth' , 2);
+plot(1:64, 1:64, ':k', 'LineWidth' , 2);
+xlabel('Nr. Cores','FontSize', 14);
+ylabel('Speedup','FontSize', 14);
+hold off;
+title('Speedup of the Barnes-Hut.','FontSize', 14);
+axis([ 1 , 64 , 0 , 64 ] );
+
+subplot('position',[ 0.42 , 0.1 , 0.57 , 0.8 ]);
+hold on
+plot(1:64, ones(64), ':k', 'LineWidth' , 1.4);
+plot(bh(:,1), efficiency(1:64), '-k', 'LineWidth' , 2);
+title('Parallel Efficiency of the Barnes-Hut.','FontSize', 14);
+xlabel('Nr. Cores','FontSize', 14);
+ylabel('Parallel Efficiency', 'FontSize', 14);
+axis([ 1 , 64 , 0 , 1.1 ]);
+hold off
+set( gcf , 'PaperSize' , 2.3*[ 12 4.5 ] );
+set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 12 4.4 ] );
+print(gcf, 'C:\Users\zcl92831\Desktop\From_desktop\quicksched\bh_results.eps', '-depsc' );
+
+%%
+
+qr = zeros(64,2);
+qr(:,2) = importdata('C:\Users\zcl92831\Desktop\From_desktop\quicksched\qr_results.txt');
+qr(:,1) = [1:64];
+
+qro = zeros(64,2);
+qro(:,2) = importdata('C:\Users\zcl92831\Desktop\From_desktop\quicksched\qr_ompss_results.txt');
+qro(:,1) = [1:64];
+
+clf;
+speedup = qr(1,2) ./ qr(:,2);
+efficiency = qr(1,2) ./ qr(:,1);
+efficiency = efficiency ./ qr(:,2);
+
+speedup2 = qro(1,2) ./ qro(:,2);
+efficiency2 = qro(1,2) ./ qro(:,1);
+efficiency2 = efficiency2 ./ qro(:,2);
+subplot('position',[ 0.05 , 0.1 , 0.3 , 0.8 ]);
+hold on
+
+plot(qr(:,1), speedup(:) ,'-k','LineWidth' , 2);
+plot(qro(:,1), speedup2(:) ,'-.k','LineWidth' , 2);
+plot(1:64, 1:64, ':k', 'LineWidth' , 2);
+xlabel('Nr. Cores','FontSize', 14);
+ylabel('Speedup','FontSize', 14);
+hold off;
+title('Speedup of the QR.','FontSize', 14);
+axis([ 1 , 64 , 0 , 64 ] );
+
+subplot('position',[ 0.42 , 0.1 , 0.57 , 0.8 ]);
+hold on
+plot(1:64, ones(64), ':k', 'LineWidth' , 1.4);
+h1=plot(qr(:,1), efficiency(1:64), '-k', 'LineWidth' , 2);
+h2=plot(qro(:,1), efficiency2(1:64), '-.k', 'LineWidth' , 2);
+title('Parallel Efficiency of the QR.','FontSize', 14);
+xlabel('Nr. Cores','FontSize', 14);
+ylabel('Parallel Efficiency', 'FontSize', 14);
+legend([h1 h2],'Quicksched', 'OmpSS', 'Location', 'SouthWest');
+axis([ 1 , 64 , 0 , 1.1 ]);
+hold off
+set( gcf , 'PaperSize' , 2.3*[ 12 4.5 ] );
+set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 12 4.4 ] );
+print(gcf, 'C:\Users\zcl92831\Desktop\From_desktop\quicksched\qr_results.eps', '-depsc' );
-- 
GitLab