You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Clang on a Mac, TpetraCore_MatrixMatrix_UnitTests_MPI_4 fails with Scalar=float and complex<float> while trying to read line 398 of tpetra/core/test/MatrixMatrix/matrices/cdt_m.mtx. Line 398 looks like this:
3860 2784 -9.6322e-41
It turns out that -9.6322e-41 is a subnormal number in float. The test prints the following:
p=0: *** Caught standard std::exception of type 'std::runtime_error' :
1:
1: .../packages/tpetra/core/inout/MatrixMarket_Tpetra.hpp:2352:
1:
1: Throw number = 2
1:
1: Throw test that evaluated to true: readSuccess == 0
1:
1: Failed to read the Matrix Market sparse matrix file: Failed to get real value from line 398 of input
I inserted print statements to figure out what file it was having trouble reading.
Weirdly, Clang had no trouble with the following example:
#include<iostream>
#include<sstream>intmain() {
std::istringstream is ("-9.6322e-41");
float fl{};
is >> fl;
std::cout << fl << std::endl;
return0;
}
Both Mac Clang, and GCC 9.2 with -std=c++17, run fine and print -9.63225e-41. However, when I change the code that reads real values from
…s:develop' (a7632d8).
* trilinos-develop:
Tpetra,kokkos-kernels: Fixtrilinos#6633
Reformulates the driver in a residual form. That is, we invoke Vcycles to correct the existing solution using the residual as the right hand side. We then removes a few matvecs and some setup stages that are not actually needed. In particular, we take advantage of the fact that the initial guess is zero on the presmoothing side of the MG cycle. Also removed the smoother setup for the coarsest region level when we have not requested to smooth on this level.
Tpetra: Add debug output to sparse matrix-matrix multiply test
Belos: Fix test build failure on Mac Clang (missing header)
Tpetra: Fix Scalar=float BCRS test failure on Mac Clang
Anasazi: Fixtrilinos#6612
Tpetra: Fixtrilinos#6611
…s:develop' (a7632d8).
* trilinos-develop:
Tpetra,kokkos-kernels: Fixtrilinos#6633
Reformulates the driver in a residual form. That is, we invoke Vcycles to correct the existing solution using the residual as the right hand side. We then removes a few matvecs and some setup stages that are not actually needed. In particular, we take advantage of the fact that the initial guess is zero on the presmoothing side of the MG cycle. Also removed the smoother setup for the coarsest region level when we have not requested to smooth on this level.
Tpetra: Add debug output to sparse matrix-matrix multiply test
Belos: Fix test build failure on Mac Clang (missing header)
Tpetra: Fix Scalar=float BCRS test failure on Mac Clang
Anasazi: Fixtrilinos#6612
Tpetra: Fixtrilinos#6611
Bug Report
@trilinos/tpetra
Description
With Clang on a Mac,
TpetraCore_MatrixMatrix_UnitTests_MPI_4
fails withScalar=float
andcomplex<float>
while trying to read line 398 oftpetra/core/test/MatrixMatrix/matrices/cdt_m.mtx
. Line 398 looks like this:It turns out that -9.6322e-41 is a subnormal number in
float
. The test prints the following:I inserted print statements to figure out what file it was having trouble reading.
Weirdly, Clang had no trouble with the following example:
Both Mac Clang, and GCC 9.2 with
-std=c++17
, run fine and print-9.63225e-41
. However, when I change the code that reads real values fromto
the test passes.
Steps to Reproduce
Build TpetraCore's tests with Mac Clang; here is part of the output of
clang++ --version
:The text was updated successfully, but these errors were encountered: