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