Skip to content

Commit

Permalink
Disable demo partially.
Browse files Browse the repository at this point in the history
The demo fails due to the fact we schedule the hessians recursively. This seems
hard to debug because it happens on clang release builds and clad for runtime11,
runtime10, and in some cases runtime9.

More information: https://github.com/vgvassilev/clad/actions/runs/8216311966
  • Loading branch information
vgvassilev committed Mar 10, 2024
1 parent 7fc6ba9 commit 79b9564
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions demos/Arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ int main() {
// the indexes of the array by using the format arr[0:<last index of arr>]
auto hessian_all = clad::hessian(weighted_avg, "arr[0:2], weights[0:2]");
// Generates the Hessian matrix for weighted_avg w.r.t. to arr.
auto hessian_arr = clad::hessian(weighted_avg, "arr[0:2]");
// auto hessian_arr = clad::hessian(weighted_avg, "arr[0:2]");

double matrix_all[36] = {0};
double matrix_arr[9] = {0};
// double matrix_arr[9] = {0};

clad::array_ref<double> matrix_all_ref(matrix_all, 36);
clad::array_ref<double> matrix_arr_ref(matrix_arr, 9);
// clad::array_ref<double> matrix_arr_ref(matrix_arr, 9);

hessian_all.execute(arr, weights, matrix_all_ref);
printf("Hessian Mode w.r.t. to all:\n matrix =\n"
Expand All @@ -102,12 +102,13 @@ int main() {
matrix_all[28], matrix_all[29], matrix_all[30], matrix_all[31],
matrix_all[32], matrix_all[33], matrix_all[34], matrix_all[35]);

hessian_arr.execute(arr, weights, matrix_arr_ref);
/*hessian_arr.execute(arr, weights, matrix_arr_ref);
printf("Hessian Mode w.r.t. to arr:\n matrix =\n"
" {%.2g, %.2g, %.2g}\n"
" {%.2g, %.2g, %.2g}\n"
" {%.2g, %.2g, %.2g}\n",
matrix_arr[0], matrix_arr[1], matrix_arr[2], matrix_arr[3],
matrix_arr[4], matrix_arr[5], matrix_arr[6], matrix_arr[7],
matrix_arr[8]);
*/
}
10 changes: 5 additions & 5 deletions test/Misc/RunDemos.C
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@
// CHECK_ARRAYS_EXEC: {0.33, 0, 0, 0, 0, 0}
// CHECK_ARRAYS_EXEC: {0, 0.33, 0, 0, 0, 0}
// CHECK_ARRAYS_EXEC: {0, 0, 0.33, 0, 0, 0}
// CHECK_ARRAYS_EXEC: Hessian Mode w.r.t. to arr:
// CHECK_ARRAYS_EXEC: matrix =
// CHECK_ARRAYS_EXEC: {0, 0, 0}
// CHECK_ARRAYS_EXEC: {0, 0, 0}
// CHECK_ARRAYS_EXEC: {0, 0, 0}
// CHECK_ARRAYS_EXEC_XFAIL: Hessian Mode w.r.t. to arr:
// CHECK_ARRAYS_EXEC_XFAIL: matrix =
// CHECK_ARRAYS_EXEC_XFAIL: {0, 0, 0}
// CHECK_ARRAYS_EXEC_XFAIL: {0, 0, 0}
// CHECK_ARRAYS_EXEC_XFAIL: {0, 0, 0}

//-----------------------------------------------------------------------------/
// Demo: VectorForwardMode.cpp
Expand Down

0 comments on commit 79b9564

Please sign in to comment.