From 2c7f6c90a74ce2b059c5812363e359e715e1774b Mon Sep 17 00:00:00 2001 From: Alec Thomson Date: Mon, 20 Mar 2023 10:13:51 +0800 Subject: [PATCH 1/2] Update __init__.py Fix for non-nix systems --- shade_ms/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shade_ms/__init__.py b/shade_ms/__init__.py index 99194c8..24830ed 100644 --- a/shade_ms/__init__.py +++ b/shade_ms/__init__.py @@ -3,7 +3,7 @@ # set default number of renderers to half the available cores DEFAULT_CNUM = 16 -DEFAULT_NUM_RENDERS = max(1, len(os.sched_getaffinity(0))//2) +DEFAULT_NUM_RENDERS = max(1, len(os.cpu_count())//2) from .__main__ import cli, parse_plot_spec, parse_slice_spec # noqa From 0e8d1c95685e6431e5615d84e689a0c211e98f11 Mon Sep 17 00:00:00 2001 From: Alec Thomson Date: Mon, 20 Mar 2023 10:14:24 +0800 Subject: [PATCH 2/2] Update __init__.py Don't need len --- shade_ms/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shade_ms/__init__.py b/shade_ms/__init__.py index 24830ed..85e5619 100644 --- a/shade_ms/__init__.py +++ b/shade_ms/__init__.py @@ -3,7 +3,7 @@ # set default number of renderers to half the available cores DEFAULT_CNUM = 16 -DEFAULT_NUM_RENDERS = max(1, len(os.cpu_count())//2) +DEFAULT_NUM_RENDERS = max(1, os.cpu_count()//2) from .__main__ import cli, parse_plot_spec, parse_slice_spec # noqa