Hi Camilla,

Thanks for the bug report!

> I am currently trying to write a program to try to calculate the spin Hall 
> angle in a 4-terminal normal metal using Kwant 1.3 and the conservation law 
> module. The scattering region is a square 40x40. I run in to a problem when 
> trying to run it. The error message I get is:
> 
> 
> *** Error in `python3': malloc(): memory corruption: 0x00000000034f0de0 ***
> ======= Backtrace: =========
> 
> and then a bunch of stuff, and in the end
> 
> [Finished in 29.6s with exit code -6]


Wow! After a bit of investigation it appears that this is a bug in numpy,
more specifically in 'numpy.linalg.lstsq', which Kwant uses internally when
time reversal symmetry is specified.

I see this bug in numpy 1.12.0 and even as far back as 1.8.2, so
unfortunately downgrading numpy is not an option.  However, I notice that using
an equivalent function from scipy does not exhibit this problem, so I
will push a fix for this in a few minutes.


As you are using the latest development version, I assume that you are
installing Kwant using the conda package on the 'kwant' channel.
If this is the case, once my fix is pushed and the new development
version is built, it will be automatically available and you *should*
just be able to go `conda update -c kwant kwant` to get the fix.


Happy Kwanting,

Joe

Attachment: signature.asc
Description: PGP signature

Reply via email to