Hello everyone,

This might be a bit off topic. I've been using kwant via anaconda for a while 
because it was easier to install, but recently I've moved to a standard 
virtualenv and compiled kwant on my own (including mumps and openblas). But 
I've notice that my code is running much faster in conda+kwant than in my 
virtualenv+kwant.

I'm still tracking why is there such a huge difference. The code basically 
builds a system without leads, extract the "hamiltonian_submatrix" for a given 
set of parameters and calculates the eigenvalues. Then I loop over a set of 
parameters. Running the code in the conda environment, it takes 15 minutes, but 
in my own virtualenv with compiled kwant it takes 2 hours!! It's exactly the 
same code.

In conda the numpy runs with MKL, while in my virtualenv it runs with openblas. 
I've run a benchmark and the MKL is giving a near 2x speedup over OpenBlas for 
SVD and eigenvalues.

I've compiled kwant with MUMPS and it seems ok. I've also tested with the kwant 
binary from Debian packages by setting "include-system-site-packages = false" 
and it get the same result (2h running time).

Is there anything else I could be missing that would speed up the code? It 
seems that numpy is not the problem, since the MKL vs OpenBlas is at most a 
factor of 2. Maybe my compilation is not properly linking to MUMPS? How can I 
check if my kwant compilation is properly using openblas and MUMPS?

Reply via email to