Skip to content

Commit ff8d772

Browse files
author
Piotr Luszczek
committed
Add changes to YAML generation so YAML parses
1 parent 46bf7ae commit ff8d772

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

src/ReportResults.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
9696
double reffnops = fnops * ((double) refMaxIters)/((double) optMaxIters);
9797

9898
YAML_Doc doc("HPCG-Benchmark", "2.4");
99-
doc.add("HPCG Benchmark","Version 2.4 June 3, 2014");
99+
doc.add("Release date", "June 3, 2014");
100100

101101
doc.add("Machine Summary","");
102102
doc.get("Machine Summary")->add("Distributed Processes",A.geom->size);
@@ -117,7 +117,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
117117
doc.get("Local Domain Dimensions")->add("ny",A.geom->ny);
118118
doc.get("Local Domain Dimensions")->add("nz",A.geom->nz);
119119

120-
doc.add("********** Problem Summary ***********","");
120+
doc.add("########## Problem Summary ##########","");
121121

122122
doc.add("Linear System Information","");
123123
doc.get("Linear System Information")->add("Number of Equations",A.totalNumberOfRows);
@@ -136,7 +136,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
136136
Af = Af->Ac;
137137
}
138138

139-
doc.add("********** Validation Testing Summary ***********","");
139+
doc.add("########## Validation Testing Summary ##########","");
140140
doc.add("Spectral Convergence Tests","");
141141
if (testcg_data.count_fail==0)
142142
doc.get("Spectral Convergence Tests")->add("Result", "PASSED");
@@ -158,7 +158,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
158158
doc.get(DepartureFromSymmetry)->add("Departure for SpMV", testsymmetry_data.depsym_spmv);
159159
doc.get(DepartureFromSymmetry)->add("Departure for MG", testsymmetry_data.depsym_mg);
160160

161-
doc.add("********** Iterations Summary ***********","");
161+
doc.add("########## Iterations Summary ##########","");
162162
doc.add("Iteration Count Information","");
163163
if (!global_failure)
164164
doc.get("Iteration Count Information")->add("Result", "PASSED");
@@ -169,7 +169,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
169169
doc.get("Iteration Count Information")->add("Total number of reference iterations", refMaxIters*numberOfCgSets);
170170
doc.get("Iteration Count Information")->add("Total number of optimized iterations", optMaxIters*numberOfCgSets);
171171

172-
doc.add("********** Reproducibility Summary ***********","");
172+
doc.add("########## Reproducibility Summary ##########","");
173173
doc.add("Reproducibility Information","");
174174
if (testnorms_data.pass)
175175
doc.get("Reproducibility Information")->add("Result", "PASSED");
@@ -178,7 +178,7 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
178178
doc.get("Reproducibility Information")->add("Scaled residual mean", testnorms_data.mean);
179179
doc.get("Reproducibility Information")->add("Scaled residual variance", testnorms_data.variance);
180180

181-
doc.add("********** Performance Summary (times in sec) ***********","");
181+
doc.add("########## Performance Summary (times in sec) ##########","");
182182

183183
doc.add("Benchmark Time Summary","");
184184
doc.get("Benchmark Time Summary")->add("Optimization phase",times[7]);
@@ -225,36 +225,36 @@ void ReportResults(const SparseMatrix & A, int numberOfMgLevels, int numberOfCgS
225225
//doc.get("Sparse Operations Overheads")->add("Halo exchange time (sec)", (times[6]));
226226
//doc.get("Sparse Operations Overheads")->add("Halo exchange as percentage of SpMV time", (times[6])/totalSparseMVTime*100.0);
227227
#endif
228-
doc.add("********** Final Summary **********","");
228+
doc.add("__________ Final Summary __________","");
229229
bool isValidRun = (testcg_data.count_fail==0) && (testsymmetry_data.count_fail==0) && (testnorms_data.pass) && (!global_failure);
230230
if (isValidRun) {
231-
doc.get("********** Final Summary **********")->add("HPCG result is VALID with a GFLOP/s rating of", totalGflops);
231+
doc.get("__________ Final Summary __________")->add("HPCG result is VALID with a GFLOP/s rating of", totalGflops);
232232
if (!A.isDotProductOptimized) {
233-
doc.get("********** Final Summary **********")->add("Reference version of ComputeDotProduct used","Performance results are most likely suboptimal");
233+
doc.get("__________ Final Summary __________")->add("Reference version of ComputeDotProduct used","Performance results are most likely suboptimal");
234234
}
235235
if (!A.isSpmvOptimized) {
236-
doc.get("********** Final Summary **********")->add("Reference version of ComputeSPMV used","Performance results are most likely suboptimal");
236+
doc.get("__________ Final Summary __________")->add("Reference version of ComputeSPMV used","Performance results are most likely suboptimal");
237237
}
238238
if (!A.isMgOptimized) {
239239
if (A.geom->numThreads>1)
240-
doc.get("********** Final Summary **********")->add("Reference version of ComputeMG used and number of threads greater than 1","Performance results are severely suboptimal");
240+
doc.get("__________ Final Summary __________")->add("Reference version of ComputeMG used and number of threads greater than 1","Performance results are severely suboptimal");
241241
else // numThreads ==1
242-
doc.get("********** Final Summary **********")->add("Reference version of ComputeMG used","Performance results are most likely suboptimal");
242+
doc.get("__________ Final Summary __________")->add("Reference version of ComputeMG used","Performance results are most likely suboptimal");
243243
}
244244
if (!A.isWaxpbyOptimized) {
245-
doc.get("********** Final Summary **********")->add("Reference version of ComputeWAXPBY used","Performance results are most likely suboptimal");
245+
doc.get("__________ Final Summary __________")->add("Reference version of ComputeWAXPBY used","Performance results are most likely suboptimal");
246246
}
247247
if (times[0]>=minOfficialTime) {
248-
doc.get("********** Final Summary **********")->add("Please send the YAML file contents to","[email protected]");
248+
doc.get("__________ Final Summary __________")->add("Please send the YAML file contents to","[email protected]");
249249
}
250250
else {
251-
doc.get("********** Final Summary **********")->add("Results are valid but execution time (sec) is",times[0]);
252-
doc.get("********** Final Summary **********")->add("Official results execution time (sec) must be at least",minOfficialTime);
251+
doc.get("__________ Final Summary __________")->add("Results are valid but execution time (sec) is",times[0]);
252+
doc.get("__________ Final Summary __________")->add("Official results execution time (sec) must be at least",minOfficialTime);
253253

254254
}
255255
} else {
256-
doc.get("********** Final Summary **********")->add("HPCG result is","INVALID.");
257-
doc.get("********** Final Summary **********")->add("Please review the YAML file contents","You may NOT submit these results for consideration.");
256+
doc.get("__________ Final Summary __________")->add("HPCG result is","INVALID.");
257+
doc.get("__________ Final Summary __________")->add("Please review the YAML file contents","You may NOT submit these results for consideration.");
258258
}
259259

260260
std::string yaml = doc.generateYAML();

src/YAML_Doc.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ YAML_Doc::~YAML_Doc(void) {
4646
*/
4747
string YAML_Doc::generateYAML() {
4848
string yaml;
49-
yaml = yaml + miniAppName + "\n";
50-
yaml = yaml + miniAppVersion + "\n";
49+
50+
yaml = yaml + miniAppName + " version: " + miniAppVersion + "\n";
51+
5152
for (size_t i=0; i<children.size(); i++) {
5253
yaml = yaml + children[i]->printYAML("");
5354
}

0 commit comments

Comments
 (0)