Optimising tenpy for cluster using MKL
Posted: 05 Mar 2025, 14:11
I currently trying to simulate cooling of purified spinrings with s=1.5. As one can probaly tell this calculation is quiet costly and increase to high calculation times around the length L= 10. Now i am trying to figure out how to improve it further numerical. As far as I can tell I already use the cython implementation for the np_conservered module ( or atleast the parameter have_cython prints ouf True) However I noticed my tenpy version is not compiled with HAVE_MKL. Also If i mark for example tensordot in np_conservered.py with @use_cython, I get an error that "there is no cython function that can replace it". So I figure something is not right and I a mat this point clueless what it could be.
My version is:
I get the following version
First I just simply installed the mkl versions of numpy, scipy etc with anaconda on a fresh enviroment together with tenpy and all packages from enviroment.yml
Then I would figure i still need to compile with MKL, I should not here this is my first time working with anything like cython so probaly my error is around here. First I just thought using the compile.sh from the tenpy git , however this does not work since i either can't find the module importtools or I get an error message related to can't find file named /tenpy/linalg/*.pyx I tried to compile _npc_helper.pxy seperate , but also not sucess.
My question is currently. do I have some kind of conceptional error on how I can compile the tenpy version with MKL and do I really need it for optimised performance?
I hope I could state my problem
My version is:
Python: Select all
tenpy.show_config()
print(tenpy.tools.optimization.have_cython_functions)
print(tenpy.tools.optimization.compiled_with_MKL)
I tried to reproduce the steps you mentioned in the section on optimisation in different ways, but I am somehow unable to not manage to get it compiled with HAVE_MKL.tenpy 1.0.2 (compiled without HAVE_MKL),
git revision unknown using
python 3.11.11 | packaged by conda-forge | (main, Mar 3 2025, 20:29:43) [MSC v.1943 64 bit (AMD64)]
numpy 1.26.4, scipy 1.15.2
True
0
First I just simply installed the mkl versions of numpy, scipy etc with anaconda on a fresh enviroment together with tenpy and all packages from enviroment.yml
Then I would figure i still need to compile with MKL, I should not here this is my first time working with anything like cython so probaly my error is around here. First I just thought using the compile.sh from the tenpy git , however this does not work since i either can't find the module importtools or I get an error message related to can't find file named /tenpy/linalg/*.pyx I tried to compile _npc_helper.pxy seperate , but also not sucess.
My question is currently. do I have some kind of conceptional error on how I can compile the tenpy version with MKL and do I really need it for optimised performance?
I hope I could state my problem