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
In unit_tests for #142, we are using fmpz_mat_mul_blas as one of the matrix multiplication methods (mathematically equivalent to our new matrix multiplication algorithm).
If FLINT is built without BLAS, then the condition#if FLINT_USES_BLAS && FLINT_BITS == 64 does not hold, and fmpz_mat_mul_blas simply returns 0.
We do not use fmpz_mat_mul_blas in production code, only in tests:
Thus we don't actually need to have FLINT with BLAS. We should fallback e.g. to fmpz_mat_mul_multi_mod (it also uses CRT), if fmpz_mat_mul_blas doesn't work.
P.S. We also do not check the return code of fmpz_mat_mul_blas, so the error message is not obvious (in fact, it means that Q_result_fmpz_mat_mul_blas is filled with zeros):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unit_tests is a Catch2 v3.4.0 host application.
Run with -? for options
-------------------------------------------------------------------------------
calculate_Block_Matrix_square
P_width=1
P_height=1 num_blocks=1
use_dist_blocks=0
-------------------------------------------------------------------------------
../test/src/unit_tests/cases/calculate_matrix_square.test.cxx:117
...............................................................................
../test/src/test_util/diff.hxx:73: FAILED:
REQUIRE( Abs(a - b) < eps * (Abs(a) + Abs(b)) )
with expansion:
0.37514 < 9.52083e-117
with messages:
input: dense tall NxK matrix P, splitted horizontally into blocks
output: NxN matrix Q := P^T P
We calculate Q with different methods, including our bigint_syrk_blas,, and
compare the results.
El::mpi::Rank() := 0
El::mpi::Rank(comm) := 0
bits = El::gmp::Precision() := 768 (0x300)
diff_precision = bits / 2 := 384 (0x180)
Initialize P_matrix and calculate local Q with builtin Elemental and FLINT
methods
DIFF(Q_result_El_Syrk, Q_result_fmpz_mat_mul_blas)
diff El::Matrix
row := 0
col := 0
DIFF(a.Get(row, col), b.Get(row, col))
a := 0.37514
b := 0
a - b := 0.37514
diff_precision := 384 (0x180)
eps := 2.53794e-116
The text was updated successfully, but these errors were encountered:
In
unit_tests
for #142, we are usingfmpz_mat_mul_blas
as one of the matrix multiplication methods (mathematically equivalent to our new matrix multiplication algorithm).If FLINT is built without BLAS, then the condition
#if FLINT_USES_BLAS && FLINT_BITS == 64
does not hold, andfmpz_mat_mul_blas
simply returns 0.We do not use
fmpz_mat_mul_blas
in production code, only in tests:sdpb/test/src/unit_tests/cases/calculate_matrix_square.test.cxx
Line 70 in 357a86b
Thus we don't actually need to have FLINT with BLAS. We should fallback e.g. to
fmpz_mat_mul_multi_mod
(it also uses CRT), iffmpz_mat_mul_blas
doesn't work.P.S. We also do not check the return code of
fmpz_mat_mul_blas
, so the error message is not obvious (in fact, it means thatQ_result_fmpz_mat_mul_blas
is filled with zeros):The text was updated successfully, but these errors were encountered: