Skip to content

Commit

Permalink
Add SUPERDSM_NUM_CPUS env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin authored Feb 20, 2024
1 parent fa27306 commit 3bf095a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/regressiontests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
python -m "superdsm.batch" examples --task-dir "${{ matrix.taskdir }}" --run
env:
SUPERDSM_INTERMEDIATE_OUTPUT: false
SUPERDSM_NUM_CPUS: 10

- name: Validate results
id: validation
Expand Down
2 changes: 1 addition & 1 deletion superdsm/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _fmt_path(self, path):
def _initialize(self):
for key, val in self.environ.items():
os.environ[key] = str(val)
ray.init(num_cpus=self.data['num_cpus'], log_to_driver=False, logging_level='error')
ray.init(num_cpus=os.environ.get('SUPERDSM_NUM_CPUS', 2), log_to_driver=False, logging_level='error')
_pipeline = create_default_pipeline()
return _pipeline

Expand Down
2 changes: 1 addition & 1 deletion superdsm/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR = 0
VERSION_MINOR = 2
VERSION_MINOR = 3
VERSION_PATCH = 0

VERSION = '%d.%d%s' % (VERSION_MAJOR, VERSION_MINOR, '.%d' % VERSION_PATCH if VERSION_PATCH > 0 else '')

0 comments on commit 3bf095a

Please sign in to comment.