KaveIO / PhiK

Phi_K correlation analyzer library
Other
155 stars 28 forks source link

NCORES Related Crash on Windows #10

Closed IronFarm closed 4 years ago

IronFarm commented 4 years ago

Hi,

It's not totally clear to me why but this line causes a crash on a Windows machine with 64 or more cores: https://github.com/KaveIO/PhiK/blob/1ae2642579f5716a6b1f1c896c2271b741cbbcb7/python/phik/phik.py#L146

I believe it is related to this long-present bug in Python: https://bugs.python.org/issue26903

I'd suggest allowing the NCORES to be overridden with an environment variable or manually decreasing the value when it is >=64 on a Windows machine.

Thanks

mbaak commented 4 years ago

Working on it.

mbaak commented 4 years ago

phik v0.9.12 should work again now on Windows machine with 64+ cores. Can you give it a try?

The number of cores used can now also be configured. Eg. for 4 cores: import phik.config phik.config.ncores = 4

... before you call phik.