Did that, it didn’t help. Is the variable relevant for runtime only? Or I should also try to recompile torch with it exported?
MKL seems properly configured:
>> mkl.get_max_threads()
>> 20

I also installed today anaconda2 with python 2.7 and pytorch (from conda) on the ubuntu laptop described above. I got the same figures. I could reproduce this on CentOS, Ubuntu, three four different machines, python 3.6, 3.5 and 2.7, with pytorch installed from source and from conda.
Can someone else run the script above and report the numbers?