I have a piece of code which computes the Helmholtz-Hodge Decomposition. I've been running on my Mac OS Yosemite and it was working just fine. A month ago, however, my Mac got pretty slow (it was really old), and I opted to buy a new notebook (Windows 8.1, Dell).
After installing all Python libs and so on, I continued my work running this same code (versioned in Git). And then the result was pretty weird, completely different from the one obtained in the old notebook.
For instance, what I do is to construct to matrices a
and b
(really long calculus) and then I call the solver:
s = numpy.linalg.solve(a, b)
This was returning a
(wrong, and different of the result obtained in my Mac, which was right).
Then, I tried to use:
s = scipy.linalg.solve(a, b)
And the program exits with code 0 but at the middle of it. Then, I just made a simple test of:
print 'here1'
s = scipy.linalg.solve(a, b)
print 'here2'
And here2
is never printed.
I tried:
print 'here1'
x, info = numpy.linalg.cg(a, b)
print 'here2'
And the same happens.
I also tried to check the solution after using numpy.linalg.solve
:
print numpy.allclose(numpy.dot(a, s), b)
And I got a False
(?!).
I don't know what is happening, how to find a solution, I just know that the same code runs in my Mac, but it would be very good if I could run it in other platforms. Now I'm stucked in this problem (don't have a Mac anymore) and with no clue about the cause.
The weirdest thing is that I don't receive any error on runtime warning, no feedback at all.
Thank you for any help.
EDIT:
Numpy Suit Test Results:
Scipy Suit Test Results:
det(b)=0
, even due to precision loss, it means your problem is not well defined. Fighting against badly conditioned matrix problem is just not the right way. – Sheetingscipy.linalg.solve
looks like a segfault, make sure BLAS/LAPACK libraries are correctly installed. – Principatenumpy
andscipy
– Derinanumpy.__version__
andscipy.__version__
? – Derinaa
andb
or only for large sizes. I've edited my answer to include a potentially reproducible example. – Affusion