Merge pull request #39 from PurplePachyderm/dev

Update vfc_ci test variables and minor bugfix in HTML report
This commit is contained in:
Pablo de Oliveira Castro 2021-05-25 10:30:24 +02:00 committed by GitHub
commit 65bb0fd0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View File

@ -235,8 +235,8 @@ class CompareRuns:
def update_n_runs(self, attrname, old, new):
# Simply update runs selection (value and string display)
self.select_n_runs.value = new
self.current_n_runs = self.n_runs_dict[self.select_n_runs.value]
self.widgets["select_n_runs"].value = new
self.current_n_runs = self.n_runs_dict[self.widgets["select_n_runs"].value]
self.update_plots()

View File

@ -87,7 +87,7 @@ T1 *outProd(T1 *vec1, T2 *vec2, unsigned int M) {
}
return C;
}
// // This flat version doesn't work. Get's stuck in an infinite recursion loop.
// template <typename T> T determinant(T *A, unsigned int M) {
// std::cout << "determinant() called..." << std::endl;
@ -232,3 +232,15 @@ template <typename T> T residual_frobenius2(T *A, unsigned int Dim) {
}
return res;
}
template <typename T> T residual2(T * A, unsigned int Dim) {
double res = 0.0;
for (unsigned int i = 0; i < Dim; i++) {
for (unsigned int j = 0; j < Dim; j++) {
T delta = (A[i * Dim + j] - (i == j));
res += delta*delta;
}
}
return res;
}

View File

@ -133,15 +133,15 @@ int test_cycle(H5File file, int cycle, std::string version,
matMul(slater_matrix, slater_inverse, res, dim);
bool ok = is_identity(res, dim, 1e-3);
double res_max = residual_max(res, dim);
double res2 = residual_frobenius2(res, dim);
double res2 = residual2(res, dim);
double frob2 = norm_frobenius2(res, dim);
#ifdef DEBUG
showMatrix(res, dim, "Result");
#endif
vfc_put_probe(probes, &(zero_padded_group)[0], &("res_max_" + version)[0],
res_max);
vfc_put_probe(probes, &(zero_padded_group)[0], &("frob2_" + version)[0],
frob2);
vfc_put_probe(probes, &(zero_padded_group)[0], &("res2_" + version)[0], res2);
delete[] res, updates, u, col_update_index, slater_matrix, slater_inverse;