We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5141791 commit 0e4d243Copy full SHA for 0e4d243
rocketpy/simulation/monte_carlo.py
@@ -283,6 +283,7 @@ def __run_in_serial(self):
283
file.write(inputs_dict)
284
raise error
285
286
+ # pylint: disable=too-many-statements
287
def __run_in_parallel(self, n_workers=None):
288
"""
289
Runs the monte carlo simulation in parallel.
@@ -298,7 +299,8 @@ def __run_in_parallel(self, n_workers=None):
298
299
None
300
301
if n_workers is None or n_workers > os.cpu_count():
- n_workers = os.cpu_count()
302
+ # For Windows, the number of workers must be at most os.cpu_count() - 1
303
+ n_workers = os.cpu_count() - 1
304
305
if n_workers < 2:
306
raise ValueError("Number of workers must be at least 2 for parallel mode.")
0 commit comments