Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Failure in test_sparse_matrices.py #12739

Open
jrubiogonzalez opened this issue Oct 10, 2024 · 4 comments
Open

[Core] Failure in test_sparse_matrices.py #12739

jrubiogonzalez opened this issue Oct 10, 2024 · 4 comments

Comments

@jrubiogonzalez
Copy link
Member

I'm finding a very strange error inside test_sparse_matrices.test_matrix_assembly. It only fails inside my WSL, on Windows it is ok, in our CI it runs ok. It is only failing in this machine.

`

FAIL: test_matrix_assembly (main.TestSparseMatrixInterface)

Traceback (most recent call last):
File "/home/jrubio/dev/Poesis/kratos/kratos/tests/test_sparse_matrices.py", line 97, in test_matrix_assembly
self.assertEqual(B.value_data()[i], validation_data[i])
AssertionError: np.float64(2.0) != -3.0


`

This is the error I get for this modified code to write the outputs:

image

And this is the output.
`
This is B:----------------------------------
CsrMatrix
size1 : 3
size2 : 3
nnz : 9
index1_data :
0,3,6,9,
index2_data :
0,1,2,0,1,2,0,1,2,
value_data :
2,-3,1,-3,6,-3,1,-3,2,

size1 : 3
size2 : 3
nnz : 9
index1_data :
0,3,6,9,
index2_data :
0,1,2,0,1,2,0,1,2,
value_data :
2,-3,1,-3,6,-3,1,-3,2,

This is B.value_data():----------------------------------
[2. 2. 2. 2. 2. 2. 2. 2. 2.]
%i : 0
[2. 2. 2. 2. 2. 2. 2. 2. 2.]
[2.0, -3.0, 1.0, -3.0, 6.0, -3.0, 1.0, -3.0, 2.0]
[0 0 0 0 0 0 0 0 0]
[0, 1, 2, 0, 1, 2, 0, 1, 2]
%i : 1
[2. 2. 2. 2. 2. 2. 2. 2. 2.]
[2.0, -3.0, 1.0, -3.0, 6.0, -3.0, 1.0, -3.0, 2.0]
[0 0 0 0 0 0 0 0 0]
[0, 1, 2, 0, 1, 2, 0, 1, 2]
F.
`

For some reason when you access through value_data() the output is not right.

As I said in other machines with different version it works OK, so it looks like some library bug. I'm adding it here for the record just in case somebody finds a similar issue.

@matekelemen
Copy link
Contributor

sounds similar to what @roigcarlo has been hunting

@roigcarlo
Copy link
Member

yep, its suspiciously similar to what we are facing in our CI. I link the PR for reference #12528

@RiccardoRossi
Copy link
Member

do you have access to the machine? If so, could you give us debug access?? we are very lost at why this happens

@roigcarlo
Copy link
Member

Also, worth to mention that I faced a similar issue in the past when trying to run tests with mismatching versions of the core and applications (in my partiuclar case was Kratos core + Linear Solvers application). so maybe its worth a check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants