Can't run MATLAB engine processes in parallel on Linux
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by running the supplied ThreadPoolExecutor and ProcessPoolExecutor examples with matlabengine 24.2.2, MATLAB R2024b Update 3, and Linux, then compare the engine startup behavior. Investigate why the process example does not complete; done means the process-based example finishes and returns the expected square-root result like the thread-based example.
Written by the indexing model from the issue text.
Description
see the following example, first with threads:
import matlab.engine
from concurrent.futures import ThreadPoolExecutor
def matlab_func(i):
eng = matlab.engine.start_matlab()
return eng.sqrt(i)
with ThreadPoolExecutor() as executor:
future = executor.submit(matlab_func, 4.0)
print(future.result())
vs the same with Processes:
import matlab.engine
from concurrent.futures import ProcessPoolExecutor
def matlab_func(i):
eng = matlab.engine.start_matlab()
return eng.sqrt(i)
with ProcessPoolExecutor() as executor:
future = executor.submit(matlab_func, 4.0)
print(future.result())
I find that the thread example works, but the process example runs forever.
This is with matlabengine version 24.2.2, MATLAB R2024b Update 3 on Linux.
- Dominant language
- Python
- Stars
- 97
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mathworks/matlab-engine-for-python
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Support sparse array Open
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in mathworks/matlab-engine-for-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenHands/extensions#626 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
CSCfi/sd-search-api#39 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
StevenBlack/hosts#3255 ·