Update zfit.py
More than 61 cores for multiprocessing is not supported on Windows
@@ -236,7 +236,11 @@ def fit_z_parallel(
filter=2,
asynch=False,
):
- n_workers = max(1, int(0.75 * _multiprocessing.cpu_count()))
+ n_cores = _multiprocessing.cpu_count()
+ if n_cores >= 80:
+ n_workers = 60
+ else:
+ n_workers = max(1, int(0.75 * n_cores))
n_locs = len(locs)
n_tasks = 100 * n_workers
spots_per_task = [
