OpenFPM  5.2.0
Project that contain the implementation of distributed structures
performancePlots.cpp
1 /*
2  * performancePlots.cpp
3  *
4  * Created on: Sep 10, 2019
5  * Author: i-bird
6  */
7 
8 #include "performancePlots.hpp"
9 
10 bool isTestInSet(std::set<std::string> &testSet, std::string name)
11 {
12  auto it = testSet.find(name);
13  bool res = it != testSet.end();
14  std::cout << "isTestInSet - key=\""+ name +"\", found=" << res << std::endl;
15  return res;
16 }
17 
18 void write_test_report(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet)
19 {
20  const char *perfResultsXmlFile = "SparseGridGpu_performance.xml";
21 
22  unsigned int plotCounter = 0;
23 
24  plotDense2DHost(report_sparsegrid_funcs, testSet, plotCounter);
25  plotSparse2DHost(report_sparsegrid_funcs, testSet, plotCounter);
26  plotDense2D(report_sparsegrid_funcs, testSet, plotCounter);
27  plotDense2DComparison(report_sparsegrid_funcs, testSet, plotCounter);
28  plotDense2DZ(report_sparsegrid_funcs, testSet, plotCounter);
29  plotDense2DZComparison(report_sparsegrid_funcs, testSet, plotCounter);
30  plotDense2DGetComparison(report_sparsegrid_funcs, testSet, plotCounter);
31  plotDense2DSkeletonComparison(report_sparsegrid_funcs, testSet, plotCounter);
32  plotDense3D(report_sparsegrid_funcs, testSet, plotCounter);
33  plotDense3DComparison(report_sparsegrid_funcs, testSet, plotCounter);
34  plotSparse2DComparison(report_sparsegrid_funcs, testSet, plotCounter);
35  plotSparse3D(report_sparsegrid_funcs, testSet, plotCounter);
36  plotDenseSparse2DComparison(report_sparsegrid_funcs, testSet, plotCounter);
37 
38  plotDense2DStencilInsert(report_sparsegrid_funcs, testSet, plotCounter);
39  plotDense2DStencilInsertComparison(report_sparsegrid_funcs, testSet, plotCounter);
40  plotDense2DStencilInplaceInsertComparison(report_sparsegrid_funcs, testSet, plotCounter);
41  plotDense2DStencilInplaceInsertComparison16(report_sparsegrid_funcs, testSet, plotCounter);
42  plotInsertSingle2D(report_sparsegrid_funcs, testSet, plotCounter);
43  plotInsertBlock2D(report_sparsegrid_funcs, testSet, plotCounter);
44 
45  plotGetSingle2D(report_sparsegrid_funcs, testSet, plotCounter);
46  plotGetNeighbourhood2D(report_sparsegrid_funcs, testSet, plotCounter);
47 
48 
49 
50  std::string file_xml_results(test_dir);
51  file_xml_results += std::string("/") + std::string(perfResultsXmlFile);
52 
53  boost::property_tree::xml_writer_settings<std::string> settings(' ', 4);
54  boost::property_tree::write_xml(file_xml_results, report_sparsegrid_funcs.graphs, std::locale(), settings);
55 
56  std::string file_xml_ref(test_dir);
57 // file_xml_ref += std::string("/openfpm_pdata/SparseGridGpu_performance_ref.xml"); // This the normal setup
58  file_xml_ref += std::string("/") + std::string(perfResultsXmlFile); // This is our setup to get the stdDev on plots
59 
60  GoogleChart cg;
61 
62  StandardXMLPerformanceGraph(file_xml_results, file_xml_ref, cg, 1);
63 
64  addUpdateTime(cg,1,"data","SparseGridGpu_performance");
65  cg.write("SparseGridGpu_performance.html");
66 }
67 
68 void plotDenseSparse2DComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
69  unsigned int plotCounter)
70 {// 2D Dense sparse comparisons
71 
72  std::string dim = "2";
73  std::string pattern = "sparse";
74  std::string linMode = "N";
75  std::string baseDense = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
76  std::string baseSparse = "performance.SparseGridGpu.device.stencil." + pattern + "." + linMode + "." + dim + "D";
77 
78  if( isTestInSet(testSet, baseDense + ".8.gridScaling")
79  && isTestInSet(testSet, baseSparse + ".05.gridScaling")
80  && isTestInSet(testSet, baseSparse + ".08.gridScaling")
81  && isTestInSet(testSet, baseSparse + ".09.gridScaling") )
82  {
83  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
84  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
85  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
86  baseSparse + ".05.gridScaling(0).blockSize"));
87  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
88  "SparseGridGPU stencil dense-" + pattern + " " + linMode + " " + dim + "D"
89  + " grid scaling performance, blockEdge=" + std::to_string(bes));
90  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
91  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
92  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
93  baseDense + ".8.gridScaling(#).GFlops.mean");
94  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
95  baseSparse + ".05.gridScaling(#).GFlops.mean");
96  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
97  baseSparse + ".08.gridScaling(#).GFlops.mean");
98  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
99  baseSparse + ".09.gridScaling(#).GFlops.mean");
100  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
101  baseDense + ".8.gridScaling(#).gridSize.x");
102  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
103  baseSparse + ".05.gridScaling(#).gridSize.x");
104  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
105  baseSparse + ".08.gridScaling(#).gridSize.x");
106  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
107  baseSparse + ".09.gridScaling(#).gridSize.x");
108  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
109 
110  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
111  "Dense");
112  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
113  "0.5 sparse");
114  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
115  "0.8 sparse");
116  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title",
117  "0.9 sparse");
118  ++plotCounter;
119  }
120  if( isTestInSet(testSet, baseDense + ".blockScaling")
121  && isTestInSet(testSet, baseSparse + ".05.blockScaling")
122  && isTestInSet(testSet, baseSparse + ".08.blockScaling")
123  && isTestInSet(testSet, baseSparse + ".09.blockScaling") )
124  {
125  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
126  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
127  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
128  baseSparse + ".05.blockScaling(0).gridSize.x"));
129  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
130  "SparseGridGPU stencil dense-" + pattern + " " + linMode + " " + dim + "D"
131  + " grid scaling performance, gridEdge=" + std::to_string(bes));
132  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "BlockEdgeSize");
133  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
134  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
135  baseDense + ".blockScaling(#).GFlops.mean");
136  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
137  baseSparse + ".05.blockScaling(#).GFlops.mean");
138  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
139  baseSparse + ".08.blockScaling(#).GFlops.mean");
140  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
141  baseSparse + ".09.blockScaling(#).GFlops.mean");
142  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
143  baseDense + ".blockScaling(#).blockSize");
144  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
145  baseSparse + ".05.blockScaling(#).blockSize");
146  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
147  baseSparse + ".08.blockScaling(#).blockSize");
148  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
149  baseSparse + ".09.blockScaling(#).blockSize");
150  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
151 
152  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
153  "Dense");
154  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
155  "0.5 sparse");
156  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
157  "0.8 sparse");
158  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title",
159  "0.9 sparse");
160  ++plotCounter;
161  }
162 }
163 
164 void plotSparse3D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
165  unsigned int &plotCounter)
166 {// Sparse 3D
167  std::string dim = "3";
168  std::string pattern = "sparse";
169  std::string linMode = "N";
170  std::string base = "performance.SparseGridGpu.device.stencil." + pattern + "." + linMode + "." + dim + "D";
171 
172  if( isTestInSet(testSet, base + ".05.gridScaling") )
173  {
174  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
175  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
176  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
177  "SparseGridGPU stencil " + pattern + " " + linMode + " " + dim + "D"
178  + " grid scaling performance");
179  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
180  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
181  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
182  base + "05.gridScaling(#).GFlops.mean");
183  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
184  base + "05.gridScaling(#).gridSize.x");
185  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
186  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
187  base + "05.gridScaling(0).blockSize"));
188  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
189  "blockEdge=" + std::to_string(bes));
190  ++plotCounter;
191  }
192  if( isTestInSet(testSet, base + ".05.blockScaling") )
193  {
194  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
195  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
196  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
197  "SparseGridGPU stencil "+pattern+" "+linMode+" "+dim+"D"
198  +" block scaling performance");
199  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
200  "BlockEdgeSize");
201  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
202  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
203  base + "05.blockScaling(#).GFlops.mean");
204  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
205  base + "05.blockScaling(#).blockSize");
206  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
207  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
208  base + "05.blockScaling(0).gridSize.x"));
209  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
210  "gridEdge=" + std::to_string(ges));
211  ++plotCounter;
212  }
213 }
214 
215 void plotSparse2DComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
216  unsigned int &plotCounter)
217 {// Sparse 2D
218  std::string dim = "2";
219  std::string pattern = "sparse";
220  std::string linMode = "N";
221  std::string baseSparse = "performance.SparseGridGpu.device.stencil." + pattern + "." + linMode + "." + dim + "D";
222 
223  if( isTestInSet(testSet, baseSparse + ".05.gridScaling")
224  && isTestInSet(testSet, baseSparse + ".08.gridScaling")
225  && isTestInSet(testSet, baseSparse + ".09.gridScaling") )
226  {
227  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
228  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
229  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
230  baseSparse + ".05.gridScaling(0).blockSize"));
231  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
232  "SparseGridGPU stencil " + pattern + " " + linMode + " " + dim + "D"
233  + " grid scaling performance, blockEdge=" + std::to_string(bes));
234  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
235  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
236  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
237  baseSparse + ".05.gridScaling(#).GFlops.mean");
238  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
239  baseSparse + ".08.gridScaling(#).GFlops.mean");
240  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
241  baseSparse + ".09.gridScaling(#).GFlops.mean");
242  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
243  baseSparse + ".05.gridScaling(#).gridSize.x");
244  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
245  baseSparse + ".08.gridScaling(#).gridSize.x");
246  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
247  baseSparse + ".09.gridScaling(#).gridSize.x");
248  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
249 
250  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
251  "0.5 sparse");
252  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
253  "0.8 sparse");
254  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
255  "0.9 sparse");
256  ++plotCounter;
257  }
258  if( isTestInSet(testSet, baseSparse + ".05.blockScaling")
259  && isTestInSet(testSet, baseSparse + ".08.blockScaling")
260  && isTestInSet(testSet, baseSparse + ".09.blockScaling") )
261  {
262  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
263  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
264  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
265  baseSparse + ".05.blockScaling(0).gridSize.x"));
266  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
267  "SparseGridGPU stencil " + pattern + " " + linMode + " " + dim + "D"
268  + " grid scaling performance, gridEdge=" + std::to_string(bes));
269  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "BlockEdgeSize");
270  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
271  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
272  baseSparse + ".05.blockScaling(#).GFlops.mean");
273  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
274  baseSparse + ".08.blockScaling(#).GFlops.mean");
275  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
276  baseSparse + ".09.blockScaling(#).GFlops.mean");
277  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
278  baseSparse + ".05.blockScaling(#).blockSize");
279  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
280  baseSparse + ".08.blockScaling(#).blockSize");
281  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
282  baseSparse + ".09.blockScaling(#).blockSize");
283  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
284 
285  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
286  "0.5 sparse");
287  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
288  "0.8 sparse");
289  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
290  "0.9 sparse");
291  ++plotCounter;
292  }
293 }
294 
295 void plotDense3D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
296  unsigned int &plotCounter)
297 {// Dense 3D
298  std::string dim = "3";
299  std::string linMode = "N";
300  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
301 
302  if( isTestInSet(testSet, base + ".gridScaling") )
303  {
304  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
305  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
306  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
307  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
308  " grid scaling performance");
309  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
310  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
311  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
312  base + ".gridScaling(#).GFlops.mean");
313  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
314  base + ".gridScaling(#).gridSize.x");
315  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
316  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
317  base + ".gridScaling(0).blockSize"));
318  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
319  "blockEdge=" + std::to_string(bes));
320  ++plotCounter;
321  }
322  if( isTestInSet(testSet, base + ".blockScaling") )
323  {
324  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
325  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
326  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
327  "SparseGridGPU stencil "+linMode+" "+dim+"D"+" block scaling performance");
328  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
329  "BlockEdgeSize");
330  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
331  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
332  base + ".blockScaling(#).GFlops.mean");
333  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
334  base + ".blockScaling(#).blockSize");
335  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
336  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
337  base + ".blockScaling(0).gridSize.x"));
338  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
339  "gridEdge=" + std::to_string(ges));
340  ++plotCounter;
341  }
342 }
343 
344 void plotDense2DZ(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
345  unsigned int &plotCounter)
346 {// Dense 2D Z-morton
347  std::string dim = "2";
348  std::string linMode = "Z";
349  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
350 
351  if( isTestInSet(testSet, base + ".gridScaling") )
352  {
353  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
354  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
355  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
356  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
357  " grid scaling performance");
358  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
359  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
360  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
361  base + ".gridScaling(#).GFlops.mean");
362  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
363  base + ".gridScaling(#).gridSize.x");
364  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
365  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
366  base + ".gridScaling(0).blockSize"));
367  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
368  "blockEdge=" + std::to_string(bes));
369  ++plotCounter;
370  }
371  if( isTestInSet(testSet, base + ".blockScaling") )
372  {
373  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
374  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
375  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
376  "SparseGridGPU stencil "+linMode+" "+dim+"D"+" block scaling performance");
377  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
378  "BlockEdgeSize");
379  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
380  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
381  base + ".blockScaling(#).GFlops.mean");
382  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
383  base + ".blockScaling(#).blockSize");
384  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
385  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
386  base + ".blockScaling(0).gridSize.x"));
387  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
388  "gridEdge=" + std::to_string(ges));
389  ++plotCounter;
390  }
391 }
392 
393 void plotDense2DHost(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
394  unsigned int &plotCounter)
395 {// Dense 2D
396  std::string dim = "2";
397  std::string linMode = "N";
398  std::string base = "performance.SparseGridGpu.host.stencil.dense." + linMode + "." + dim + "D";
399 
400  if( isTestInSet(testSet, base + ".gridScaling") )
401  {
402  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
403  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
404  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
405  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
406  " grid scaling performance");
407  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
408  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
409  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
410  base + ".gridScaling(#).GFlops.mean");
411  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
412  base + ".gridScaling(#).gridSize.x");
413  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
414  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
415  base + ".gridScaling(0).blockSize"));
416  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
417  "blockEdge=" + std::to_string(bes));
418  ++plotCounter;
419  }
420  if( isTestInSet(testSet, base + ".blockScaling") )
421  {
422  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
423  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
424  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
425  "SparseGridGPU stencil "+linMode+" "+dim+"D"+" block scaling performance");
426  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
427  "BlockEdgeSize");
428  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
429  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
430  base + ".blockScaling(#).GFlops.mean");
431  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
432  base + ".blockScaling(#).blockSize");
433  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
434  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
435  base + ".blockScaling(0).gridSize.x"));
436  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
437  "gridEdge=" + std::to_string(ges));
438  ++plotCounter;
439  }
440 }
441 void plotSparse2DHost(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
442  unsigned int &plotCounter)
443 {// Dense 2D
444  std::string dim = "2";
445  std::string linMode = "N";
446  std::string base = "performance.SparseGridGpu.host.stencil.sparse." + linMode + "." + dim + "D";
447 
448  if( isTestInSet(testSet, base + ".05.gridScaling") )
449  {
450  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
451  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
452  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
453  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
454  " grid scaling performance");
455  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
456  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
457  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
458  base + ".05.gridScaling(#).GFlops.mean");
459  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
460  base + ".05.gridScaling(#).gridSize.x");
461  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
462  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
463  base + ".05.gridScaling(0).blockSize"));
464  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
465  "blockEdge=" + std::to_string(bes));
466  ++plotCounter;
467  }
468  if( isTestInSet(testSet, base + ".05.blockScaling") )
469  {
470  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
471  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
472  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
473  "SparseGridGPU stencil "+linMode+" "+dim+"D"+" block scaling performance");
474  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
475  "BlockEdgeSize");
476  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
477  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
478  base + ".05.blockScaling(#).GFlops.mean");
479  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
480  base + ".05.blockScaling(#).blockSize");
481  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
482  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
483  base + ".05.blockScaling(0).gridSize.x"));
484  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
485  "gridEdge=" + std::to_string(ges));
486  ++plotCounter;
487  }
488 }
489 
490 void plotDense2D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
491  unsigned int &plotCounter)
492 {// Dense 2D
493  std::string dim = "2";
494  std::string linMode = "N";
495  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
496 
497  if( isTestInSet(testSet, base + ".gridScaling") )
498  {
499  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
500  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
501  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
502  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
503  " grid scaling performance");
504  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
505  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
506  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
507  base + ".gridScaling(#).GFlops.mean");
508  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
509  base + ".gridScaling(#).gridSize.x");
510  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
511  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
512  base + ".gridScaling(0).blockSize"));
513  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
514  "blockEdge=" + std::to_string(bes));
515  ++plotCounter;
516  }
517  if( isTestInSet(testSet, base + ".blockScaling") )
518  {
519  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
520  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
521  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
522  "SparseGridGPU stencil "+linMode+" "+dim+"D"+" block scaling performance");
523  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
524  "BlockEdgeSize");
525  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
526  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
527  base + ".blockScaling(#).GFlops.mean");
528  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
529  base + ".blockScaling(#).blockSize");
530  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
531  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
532  base + ".blockScaling(0).gridSize.x"));
533  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
534  "gridEdge=" + std::to_string(ges));
535  ++plotCounter;
536  }
537 }
538 
539 void plotDense2DComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
540  unsigned int &plotCounter)
541 {// Dense 2D
542  std::string dim = "2";
543  std::string linMode = "N";
544  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
545 
546  if( isTestInSet(testSet, base + ".2.gridScaling")
547  && isTestInSet(testSet, base + ".4.gridScaling")
548  && isTestInSet(testSet, base + ".8.gridScaling")
549  && isTestInSet(testSet, base + ".16.gridScaling")
550  && isTestInSet(testSet, base + ".32.gridScaling")
551  )
552  {
553  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
554  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
555  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
556  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
557  " grid scaling performance");
558  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
559  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
560 
561  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
562  base + ".2.gridScaling(#).GFlops.mean");
563  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
564  base + ".4.gridScaling(#).GFlops.mean");
565  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
566  base + ".8.gridScaling(#).GFlops.mean");
567  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
568  base + ".16.gridScaling(#).GFlops.mean");
569  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
570  base + ".32.gridScaling(#).GFlops.mean");
571 
572  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
573  base + ".2.gridScaling(#).gridSize.x");
574  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
575  base + ".4.gridScaling(#).gridSize.x");
576  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
577  base + ".8.gridScaling(#).gridSize.x");
578  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
579  base + ".16.gridScaling(#).gridSize.x");
580  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
581  base + ".32.gridScaling(#).gridSize.x");
582 
583 
584  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
585 
586  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=2");
587  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=4");
588  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title", "blockEdge=8");
589  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title", "blockEdge=16");
590  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title", "blockEdge=32");
591 
592  ++plotCounter;
593  }
594 }
595 
596 void plotDense2DSkeletonComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
597  unsigned int &plotCounter)
598 {// Dense 2D
599  std::string dim = "2";
600  std::string linMode = "N";
601  std::string base = "performance.SparseGridGpu.device.skeleton.dense." + linMode + "." + dim + "D";
602 
603  if( isTestInSet(testSet, base + ".2.gridScaling")
604  && isTestInSet(testSet, base + ".4.gridScaling")
605  && isTestInSet(testSet, base + ".8.gridScaling")
606  && isTestInSet(testSet, base + ".16.gridScaling")
607  && isTestInSet(testSet, base + ".32.gridScaling")
608  )
609  {
610  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
611  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
612  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
613  "SparseGridGPU skeleton stencil " + linMode + " " + dim + "D" +
614  " grid scaling performance");
615  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
616  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Elem/s");
617 
618  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
619  base + ".2.gridScaling(#).GFlops.mean");
620  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
621  base + ".4.gridScaling(#).GFlops.mean");
622  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
623  base + ".8.gridScaling(#).GFlops.mean");
624  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
625  base + ".16.gridScaling(#).GFlops.mean");
626  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
627  base + ".32.gridScaling(#).GFlops.mean");
628 
629  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
630  base + ".2.gridScaling(#).gridSize.x");
631  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
632  base + ".4.gridScaling(#).gridSize.x");
633  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
634  base + ".8.gridScaling(#).gridSize.x");
635  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
636  base + ".16.gridScaling(#).gridSize.x");
637  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
638  base + ".32.gridScaling(#).gridSize.x");
639 
640 
641  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
642 
643  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=2");
644  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=4");
645  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title", "blockEdge=8");
646  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title", "blockEdge=16");
647  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title", "blockEdge=32");
648 
649  ++plotCounter;
650  }
651 }
652 
653 void plotDense2DGetComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
654  unsigned int &plotCounter)
655 {// Dense 2D
656  std::string dim = "2";
657  std::string linMode = "N";
658  std::string base = "performance.SparseGridGpu.device.stencilGet.dense." + linMode + "." + dim + "D";
659 
660  if( isTestInSet(testSet, base + ".2.gridScaling")
661  && isTestInSet(testSet, base + ".4.gridScaling")
662  && isTestInSet(testSet, base + ".8.gridScaling")
663  && isTestInSet(testSet, base + ".16.gridScaling")
664  && isTestInSet(testSet, base + ".32.gridScaling")
665  )
666  {
667  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
668  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
669  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
670  "SparseGridGPU GET stencil " + linMode + " " + dim + "D" +
671  " grid scaling performance");
672  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
673  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Flops/s");
674 
675  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
676  base + ".2.gridScaling(#).GFlops.mean");
677  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
678  base + ".4.gridScaling(#).GFlops.mean");
679  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
680  base + ".8.gridScaling(#).GFlops.mean");
681  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
682  base + ".16.gridScaling(#).GFlops.mean");
683  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
684  base + ".32.gridScaling(#).GFlops.mean");
685 
686  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
687  base + ".2.gridScaling(#).gridSize.x");
688  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
689  base + ".4.gridScaling(#).gridSize.x");
690  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
691  base + ".8.gridScaling(#).gridSize.x");
692  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
693  base + ".16.gridScaling(#).gridSize.x");
694  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
695  base + ".32.gridScaling(#).gridSize.x");
696 
697 
698  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
699 
700  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=2");
701  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=4");
702  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title", "blockEdge=8");
703  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title", "blockEdge=16");
704  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title", "blockEdge=32");
705 
706  ++plotCounter;
707  }
708 }
709 
710 void plotDense2DZComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
711  unsigned int &plotCounter)
712 {// Dense 2D
713  std::string dim = "2";
714  std::string linMode = "Z";
715  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
716 
717  if( isTestInSet(testSet, base + ".2.gridScaling")
718  && isTestInSet(testSet, base + ".4.gridScaling")
719  && isTestInSet(testSet, base + ".8.gridScaling")
720  && isTestInSet(testSet, base + ".16.gridScaling")
721  && isTestInSet(testSet, base + ".32.gridScaling")
722  )
723  {
724  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
725  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
726  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
727  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
728  " grid scaling performance");
729  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
730  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
731 
732  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
733  base + ".2.gridScaling(#).GFlops.mean");
734  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
735  base + ".4.gridScaling(#).GFlops.mean");
736  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
737  base + ".8.gridScaling(#).GFlops.mean");
738  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
739  base + ".16.gridScaling(#).GFlops.mean");
740  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
741  base + ".32.gridScaling(#).GFlops.mean");
742 
743  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
744  base + ".2.gridScaling(#).gridSize.x");
745  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
746  base + ".4.gridScaling(#).gridSize.x");
747  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
748  base + ".8.gridScaling(#).gridSize.x");
749  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
750  base + ".16.gridScaling(#).gridSize.x");
751  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
752  base + ".32.gridScaling(#).gridSize.x");
753 
754 
755  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
756 
757  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=2");
758  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=4");
759  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title", "blockEdge=8");
760  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title", "blockEdge=16");
761  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title", "blockEdge=32");
762 
763  ++plotCounter;
764  }
765 }
766 
767 void plotDense3DComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
768  unsigned int &plotCounter)
769 {// Dense 2D
770  std::string dim = "3";
771  std::string linMode = "N";
772  std::string base = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
773 
774  if( isTestInSet(testSet, base + ".2.gridScaling")
775  && isTestInSet(testSet, base + ".4.gridScaling")
776  && isTestInSet(testSet, base + ".8.gridScaling")
777  )
778  {
779  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
780  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
781  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
782  "SparseGridGPU stencil " + linMode + " " + dim + "D" +
783  " grid scaling performance");
784  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
785  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
786 
787  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
788  base + ".2.gridScaling(#).GFlops.mean");
789  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
790  base + ".4.gridScaling(#).GFlops.mean");
791  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
792  base + ".8.gridScaling(#).GFlops.mean");
793 
794  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
795  base + ".2.gridScaling(#).gridSize.x");
796  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
797  base + ".4.gridScaling(#).gridSize.x");
798  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
799  base + ".8.gridScaling(#).gridSize.x");
800 
801 
802  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
803 
804  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=2");
805  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=4");
806  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title", "blockEdge=8");
807 
808  ++plotCounter;
809  }
810 }
811 
812 void plotDense2DStencilInsert(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
813  unsigned int &plotCounter)
814 {// Dense 2D
815  std::string dim = "2";
816  std::string linMode = "N";
817  std::string base = "performance.SparseGridGpu.device.stencilInsert.dense." + linMode + "." + dim + "D";
818 
819  if( isTestInSet(testSet, base + ".gridScaling") )
820  {
821  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
822  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
823  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
824  "SparseGridGPU stencil-insert " + linMode + " " + dim + "D" +
825  " grid scaling performance");
826  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
827  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
828  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
829  base + ".gridScaling(#).GFlops.mean");
830  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
831  base + ".gridScaling(#).gridSize.x");
832  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
833  int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
834  base + ".gridScaling(0).blockSize"));
835  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
836  "blockEdge=" + std::to_string(bes));
837  ++plotCounter;
838  }
839  if( isTestInSet(testSet, base + ".blockScaling") )
840  {
841  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
842  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
843  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
844  "SparseGridGPU stencil-insert "+linMode+" "+dim+"D"+" block scaling performance");
845  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
846  "BlockEdgeSize");
847  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
848  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
849  base + ".blockScaling(#).GFlops.mean");
850  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
851  base + ".blockScaling(#).blockSize");
852  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
853  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
854  base + ".blockScaling(0).gridSize.x"));
855  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
856  "gridEdge=" + std::to_string(ges));
857  ++plotCounter;
858  }
859 }
860 
861 void plotDense2DStencilInsertComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
862  unsigned int &plotCounter)
863 {// Dense 2D
864  std::string dim = "2";
865  std::string linMode = "N";
866  std::string base = "performance.SparseGridGpu.device.stencilInsert.dense." + linMode + "." + dim + "D";
867 
868  if( isTestInSet(testSet, base + ".8.gridScaling")
869  && isTestInSet(testSet, base + ".16.gridScaling")
870  )
871  {
872  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
873  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
874  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
875  "SparseGridGPU stencil-insert " + linMode + " " + dim + "D" +
876  " grid scaling performance");
877  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
878  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
879 
880  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
881  base + ".8.gridScaling(#).GFlops.mean");
882  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
883  base + ".16.gridScaling(#).GFlops.mean");
884 
885  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
886  base + ".8.gridScaling(#).gridSize.x");
887  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
888  base + ".16.gridScaling(#).gridSize.x");
889 
890  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
891 
892  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "blockEdge=8");
893  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "blockEdge=16");
894 
895  ++plotCounter;
896  }
897 }
898 
899 void plotDense2DStencilInplaceInsertComparison(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
900  unsigned int &plotCounter)
901 {// Dense 2D
902  std::string dim = "2";
903  std::string linMode = "N";
904  std::string baseInplace = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
905  std::string baseInsert = "performance.SparseGridGpu.device.stencilInsert.dense." + linMode + "." + dim + "D";
906 
907  if( isTestInSet(testSet, baseInplace + ".8.gridScaling")
908  && isTestInSet(testSet, baseInsert + ".8.gridScaling")
909  )
910  {
911  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
912  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
913  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
914  "SparseGridGPU stencil in-place vs. insert " + linMode + " " + dim + "D" +
915  " - blockEdge=8");
916  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
917  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
918 
919  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
920  baseInplace + ".8.gridScaling(#).GFlops.mean");
921  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
922  baseInsert + ".8.gridScaling(#).GFlops.mean");
923 
924  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
925  baseInplace + ".8.gridScaling(#).gridSize.x");
926  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
927  baseInsert + ".8.gridScaling(#).gridSize.x");
928 
929  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
930 
931  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "In-place");
932  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "Insert");
933 
934  ++plotCounter;
935  }
936 }
937 
938 void plotDense2DStencilInplaceInsertComparison16(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
939  unsigned int &plotCounter)
940 {// Dense 2D
941  std::string dim = "2";
942  std::string linMode = "N";
943  std::string baseInplace = "performance.SparseGridGpu.device.stencil.dense." + linMode + "." + dim + "D";
944  std::string baseInsert = "performance.SparseGridGpu.device.stencilInsert.dense." + linMode + "." + dim + "D";
945 
946  if( isTestInSet(testSet, baseInplace + ".16.gridScaling")
947  && isTestInSet(testSet, baseInsert + ".16.gridScaling")
948  )
949  {
950  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
951  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
952  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
953  "SparseGridGPU stencil in-place vs. insert " + linMode + " " + dim + "D" +
954  " - blockEdge=16");
955  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
956  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G flops/s");
957 
958  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
959  baseInplace + ".16.gridScaling(#).GFlops.mean");
960  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
961  baseInsert + ".16.gridScaling(#).GFlops.mean");
962 
963  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
964  baseInplace + ".16.gridScaling(#).gridSize.x");
965  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
966  baseInsert + ".16.gridScaling(#).gridSize.x");
967 
968  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
969 
970  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title", "In-place");
971  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title", "Insert");
972 
973  ++plotCounter;
974  }
975 }
976 
977 void plotInsertSingle2D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
978  unsigned int &plotCounter)
979 {
980  std::string dim = "2";
981  std::string insertMode = "single";
982  std::string base = "performance.SparseGridGpu.device.insert.dense." + insertMode + "." + dim + "D";
983 
984  if( isTestInSet(testSet, base + ".2.gridScaling")
985  && isTestInSet(testSet, base + ".4.gridScaling")
986  && isTestInSet(testSet, base + ".8.gridScaling")
987  )
988  {
989  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
990  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
991  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
992  "SparseGridGPU insert " + insertMode + " " + dim + "D" +
993  " grid scaling performance");
994  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
995  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "M Inserts/s");
996  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
997  base + ".2.gridScaling(#).Minsert.mean");
998  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
999  base + ".4.gridScaling(#).Minsert.mean");
1000  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
1001  base + ".8.gridScaling(#).Minsert.mean");
1002  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1003  base + ".2.gridScaling(#).gridSize.x");
1004  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
1005  base + ".4.gridScaling(#).gridSize.x");
1006  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
1007  base + ".8.gridScaling(#).gridSize.x");
1008  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
1009 // int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1010 // base + ".gridScaling(0).blockSize"));
1011  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1012  "blockEdge=2");
1013  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
1014  "blockEdge=4");
1015  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
1016  "blockEdge=8");
1017  ++plotCounter;
1018  }
1019  if( isTestInSet(testSet, base + ".blockScaling") )
1020  {
1021  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1022  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1023  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1024  "SparseGridGPU insert "+insertMode+" "+dim+"D"+" block scaling performance");
1025  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
1026  "BlockEdgeSize");
1027  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "M Inserts/s");
1028  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1029  base + ".blockScaling(#).Minsert.mean");
1030  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1031  base + ".blockScaling(#).blockSize");
1032  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
1033  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1034  base + ".blockScaling(0).gridSize.x"));
1035  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1036  "gridEdge=" + std::to_string(ges));
1037  ++plotCounter;
1038  }
1039 }
1040 
1041 void plotInsertBlock2D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
1042  unsigned int &plotCounter)
1043 {
1044  std::string dim = "2";
1045  std::string insertMode = "block";
1046  std::string base = "performance.SparseGridGpu.device.insert.dense." + insertMode + "." + dim + "D";
1047 
1048  if( isTestInSet(testSet, base + ".2.gridScaling")
1049  && isTestInSet(testSet, base + ".4.gridScaling")
1050  && isTestInSet(testSet, base + ".8.gridScaling")
1051  && isTestInSet(testSet, base + ".16.gridScaling")
1052  && isTestInSet(testSet, base + ".32.gridScaling")
1053  )
1054  {
1055  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1056  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1057  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1058  "SparseGridGPU insert " + insertMode + " " + dim + "D" +
1059  " grid scaling performance");
1060  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
1061  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "M Inserts/s");
1062  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1063  base + ".2.gridScaling(#).Minsert.mean");
1064  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
1065  base + ".4.gridScaling(#).Minsert.mean");
1066  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
1067  base + ".8.gridScaling(#).Minsert.mean");
1068  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
1069  base + ".16.gridScaling(#).Minsert.mean");
1070  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
1071  base + ".32.gridScaling(#).Minsert.mean");
1072  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1073  base + ".2.gridScaling(#).gridSize.x");
1074  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
1075  base + ".4.gridScaling(#).gridSize.x");
1076  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
1077  base + ".8.gridScaling(#).gridSize.x");
1078  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
1079  base + ".16.gridScaling(#).gridSize.x");
1080  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
1081  base + ".32.gridScaling(#).gridSize.x");
1082  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
1083 // int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1084 // base + ".gridScaling(0).blockSize"));
1085  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1086  "blockEdge=2");
1087  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
1088  "blockEdge=4");
1089  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
1090  "blockEdge=8");
1091  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title",
1092  "blockEdge=16");
1093  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title",
1094  "blockEdge=32");
1095  ++plotCounter;
1096  }
1097  if( isTestInSet(testSet, base + ".blockScaling") )
1098  {
1099  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1100  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1101  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1102  "SparseGridGPU insert "+insertMode+" "+dim+"D"+" block scaling performance");
1103  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
1104  "BlockEdgeSize");
1105  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "M Inserts/s");
1106  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1107  base + ".blockScaling(#).Minsert.mean");
1108  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1109  base + ".blockScaling(#).blockSize");
1110  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
1111  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1112  base + ".blockScaling(0).gridSize.x"));
1113  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1114  "gridEdge=" + std::to_string(ges));
1115  ++plotCounter;
1116  }
1117 }
1118 
1119 void plotGetSingle2D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
1120  unsigned int &plotCounter)
1121 {
1122  std::string dim = "2";
1123  std::string getMode = "single";
1124  std::string base = "performance.SparseGridGpu.device.get.dense." + getMode + "." + dim + "D";
1125 
1126  if( isTestInSet(testSet, base + ".2.gridScaling")
1127  && isTestInSet(testSet, base + ".4.gridScaling")
1128  && isTestInSet(testSet, base + ".8.gridScaling")
1129  && isTestInSet(testSet, base + ".16.gridScaling")
1130  && isTestInSet(testSet, base + ".32.gridScaling")
1131  )
1132  {
1133  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1134  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1135  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1136  "SparseGridGPU get " + getMode + " " + dim + "D" +
1137  " grid scaling performance");
1138  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
1139  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Gets/s");
1140  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1141  base + ".2.gridScaling(#).Gget.mean");
1142  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
1143  base + ".4.gridScaling(#).Gget.mean");
1144  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
1145  base + ".8.gridScaling(#).Gget.mean");
1146  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
1147  base + ".16.gridScaling(#).Gget.mean");
1148  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
1149  base + ".32.gridScaling(#).Gget.mean");
1150  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1151  base + ".2.gridScaling(#).gridSize.x");
1152  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
1153  base + ".4.gridScaling(#).gridSize.x");
1154  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
1155  base + ".8.gridScaling(#).gridSize.x");
1156  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
1157  base + ".16.gridScaling(#).gridSize.x");
1158  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
1159  base + ".32.gridScaling(#).gridSize.x");
1160  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
1161 // int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1162 // base + ".gridScaling(0).blockSize"));
1163  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1164  "blockEdge=2");
1165  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
1166  "blockEdge=4");
1167  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
1168  "blockEdge=8");
1169  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title",
1170  "blockEdge=16");
1171  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title",
1172  "blockEdge=32");
1173  ++plotCounter;
1174  }
1175  if( isTestInSet(testSet, base + ".blockScaling") )
1176  {
1177  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1178  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1179  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1180  "SparseGridGPU get "+getMode+" "+dim+"D"+" block scaling performance");
1181  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
1182  "BlockEdgeSize");
1183  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Gets/s");
1184  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1185  base + ".blockScaling(#).Gget.mean");
1186  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1187  base + ".blockScaling(#).blockSize");
1188  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
1189  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1190  base + ".blockScaling(0).gridSize.x"));
1191  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1192  "gridEdge=" + std::to_string(ges));
1193  ++plotCounter;
1194  }
1195 }
1196 
1197 void plotGetNeighbourhood2D(report_sparse_grid_tests &report_sparsegrid_funcs, std::set<std::string> &testSet,
1198  unsigned int &plotCounter)
1199 {
1200  std::string dim = "2";
1201  std::string getMode = "neighbourhood";
1202  std::string base = "performance.SparseGridGpu.device.get.dense." + getMode + "." + dim + "D";
1203 
1204  if( isTestInSet(testSet, base + ".2.gridScaling")
1205  && isTestInSet(testSet, base + ".4.gridScaling")
1206  && isTestInSet(testSet, base + ".8.gridScaling")
1207  && isTestInSet(testSet, base + ".16.gridScaling")
1208  && isTestInSet(testSet, base + ".32.gridScaling")
1209  )
1210  {
1211  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1212  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1213  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1214  "SparseGridGPU get " + getMode + " " + dim + "D" +
1215  " grid scaling performance");
1216  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title", "GridEdgeSize");
1217  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Gets/s");
1218  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1219  base + ".2.gridScaling(#).Gget.mean");
1220  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).source",
1221  base + ".4.gridScaling(#).Gget.mean");
1222  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).source",
1223  base + ".8.gridScaling(#).Gget.mean");
1224  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).source",
1225  base + ".16.gridScaling(#).Gget.mean");
1226  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).source",
1227  base + ".32.gridScaling(#).Gget.mean");
1228  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1229  base + ".2.gridScaling(#).gridSize.x");
1230  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(1).source",
1231  base + ".4.gridScaling(#).gridSize.x");
1232  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(2).source",
1233  base + ".8.gridScaling(#).gridSize.x");
1234  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(3).source",
1235  base + ".16.gridScaling(#).gridSize.x");
1236  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(4).source",
1237  base + ".32.gridScaling(#).gridSize.x");
1238  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x", true);
1239 // int bes = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1240 // base + ".gridScaling(0).blockSize"));
1241  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1242  "blockEdge=2");
1243  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(1).title",
1244  "blockEdge=4");
1245  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(2).title",
1246  "blockEdge=8");
1247  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(3).title",
1248  "blockEdge=16");
1249  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(4).title",
1250  "blockEdge=32");
1251  ++plotCounter;
1252  }
1253  if( isTestInSet(testSet, base + ".blockScaling") )
1254  {
1255  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").type", "line");
1256  report_sparsegrid_funcs.graphs.put("graphs.graph(" + std::to_string(plotCounter) + ").interpolation", "none");
1257  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").title",
1258  "SparseGridGPU get "+getMode+" "+dim+"D"+" block scaling performance");
1259  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.title",
1260  "BlockEdgeSize");
1261  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.title", "G Gets/s");
1262  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).source",
1263  base + ".blockScaling(#).Gget.mean");
1264  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").x.data(0).source",
1265  base + ".blockScaling(#).blockSize");
1266  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").options.log_x",true);
1267  int ges = static_cast<int>( report_sparsegrid_funcs.graphs.template get<double>(
1268  base + ".blockScaling(0).gridSize.x"));
1269  report_sparsegrid_funcs.graphs.add("graphs.graph(" + std::to_string(plotCounter) + ").y.data(0).title",
1270  "gridEdge=" + std::to_string(ges));
1271  ++plotCounter;
1272  }
1273 }
1274 
Small class to produce graph with Google chart in HTML.
void write(std::string file)
It write the graphs on file in html format using Google charts.