-
Notifications
You must be signed in to change notification settings - Fork 0
Installation error on pyfnntw==0.4.0 #5
Comments
I will switch it back to >3.7. I believe I also accidentally left out a feature... I will fix these |
go ahead and try again. If it doesn't work... try disabling |
4.1 is out with >3.7 and no |
I have successfully installed pytnntw==0.4.1 and everything works well. My test script is as below: import numpy as np
from time import time
from scipy.spatial import KDTree
import pyfnntw
N = 10**7
k = 12
pos = np.random.random((N, 3))
start = time()
kdt = KDTree(pos, 32, boxsize=[1.0, 1.0, 1.0])
print(f"Scipy build tree time: {time()-start} s.")
start1 = time()
dis, indices = kdt.query(pos, k, workers=-1)
end = time()
print(f"Scipy query time: {end-start1} s.")
print(f"Scipy total time: {end-start} s.")
print(indices[0])
start = time()
kdt = pyfnntw.Treef64(
pos, leafsize=32, par_split_level=4, boxsize=np.array([1.0, 1.0, 1.0])
)
print(f"Pyfnntw build tree time: {time()-start} s.")
start1 = time()
dis, indices = kdt.query(pos, k)
end = time()
print(f"Pyfnntw query time: {end-start1} s.")
print(f"Pyfnntw total time: {end-start} s.")
print(indices[0]) In my computer, Intel Xeon E5-2630 @2.2GHz (20 cores), the output is as below: Scipy build tree time: 17.172202825546265 s.
Scipy query time: 10.185096025466919 s.
Scipy total time: 27.357298851013184 s.
[ 0 635729 4951542 2569924 7108333 5208854 3171473 9350673 3314987
1842148 5125748 2983723]
Parallelism activated: 40 threads
Pyfnntw build tree time: 1.5725889205932617 s.
Pyfnntw query time: 10.762544393539429 s.
Pyfnntw total time: 12.336133241653442 s.
[ 0 635729 4951542 2569924 7108333 5208854 3171473 9350673 3314987
1842148 5125748 2983723] The pyfnntw shows excellent performance on building KDtree aginst that in Scipy. Thanks for your significant work, and I have add pyfnntw to my library to accelerate the NearestNeighbor Search. |
I install pyfnntw by:
I use Conda environment and the PYTHON version is 3.11.0 (as required in pyproject.toml) ans OS is windows10.
The output is as below:
In my WSL, the error seems to be related to tcmalloc-sys v0.3.0.
Can you tell me how to solve it?
BTW., why the PYTHON version is required larger than 3.11.0? It would be helpful to change it to >=3.7.0.
The text was updated successfully, but these errors were encountered: