Skip to content

Commit

Permalink
unit_test: test norm with small tile to avoid old LAPACK inaccuracy bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed May 31, 2024
1 parent 1c4e90a commit 6d897e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions unit_test/test_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void test_genorm_dev(Norm norm)
}

double eps = std::numeric_limits<double>::epsilon();
int m = 3000;
int n = 3000;
int m = 20;
int n = 30;
int lda = roundup(m, 8);
double* Adata = new double[ lda * n ];
slate::Tile<double> A(m, n, Adata, lda, -1, slate::TileKind::UserOwned);
Expand Down Expand Up @@ -374,7 +374,11 @@ void test_synorm_dev(Norm norm, Uplo uplo)
}

double eps = std::numeric_limits<double>::epsilon();
int n = 3000;

// Note: if testing with large n, some LAPACK versions have an
// inaccurate Frobenius lansy. If problems are encountered,
// verify with reference LAPACK >= v3.10.0.
int n = 30;
int lda = roundup(n, 8);
double* Adata = new double[ lda * n ];
slate::Tile<double> A(n, n, Adata, lda, -1, slate::TileKind::UserOwned);
Expand Down
2 changes: 1 addition & 1 deletion unit_test/unit_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ std::string output_fail( AssertError const& ex )
std::string output_skip( SkipException const& ex )
{
return std::string( ansi_magenta ) + "skipped: " + ansi_normal
+ ansi_gray + ex.what() + ansi_normal + "\n";
+ ansi_gray + ex.what() + ansi_normal;
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit 6d897e1

Please sign in to comment.