Skip to content

Commit

Permalink
silence aa warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Apr 23, 2019
1 parent ead7ec1 commit d3d1d4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ static aa_int solve(aa_float *f, AaWork *a, aa_int len) {
BLAS(gesv)(&blen, &one, a->M, &bk, a->ipiv, a->work, &blen, &info);
nrm = BLAS(nrm2)(&bk, a->work, &one);
if (info < 0 || nrm >= MAX_AA_NRM) {
printf("Error in AA type %i, iter: %i, info: %i, norm %.2e\n",
#if EXTRA_VERBOSE > 0
scs_printf("Error in AA type %i, iter: %i, info: %i, norm %.2e\n",
a->type1 ? 1 : 2, (int)a->iter, (int)info, nrm);
#endif
return -1;
}
/* if solve was successful then set f -= D * work */
Expand All @@ -159,7 +161,7 @@ static aa_int solve(aa_float *f, AaWork *a, aa_int len) {
AaWork *aa_init(aa_int l, aa_int aa_mem, aa_int type1) {
AaWork *a = (AaWork *)calloc(1, sizeof(AaWork));
if (!a) {
printf("Failed to allocate memory for AA.\n");
scs_printf("Failed to allocate memory for AA.\n");
return (void *)0;
}
a->type1 = type1;
Expand Down
6 changes: 3 additions & 3 deletions test/run_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ static const char *all_tests(void) {
int main(void) {
const char *result = all_tests();
if (result != 0) {
printf("%s\n", result);
scs_printf("%s\n", result);
} else {
printf("ALL TESTS PASSED\n");
scs_printf("ALL TESTS PASSED\n");
}
printf("Tests run: %d\n", tests_run);
scs_printf("Tests run: %d\n", tests_run);

return result != 0;
}

0 comments on commit d3d1d4c

Please sign in to comment.