Best way to run several scripts at the same time
조회 수: 47 (최근 30일)
이전 댓글 표시
Hello :)
I want to run the same script but with some differences in some parameters to compare results, and I don't know what is the best way to do this. My initial thought is to open several sessions of MatLab and run the scripts in each session, but I'm not sure if that is the optimum way. I have a PC with Windows and i9 12 core, I want to make sure I’m taking the most advantage out of those darn cores.
So, the question is. How can is run several scripts making sure I’m taking the most advantage out of the processor's cores?
Thanks in advance for your replies.
댓글 수: 6
Walter Roberson
2022년 7월 8일
편집: Walter Roberson
2025년 8월 2일
No, it is a feature newer than your release https://www.mathworks.com/help/matlab/background-processing.html
답변 (1개)
Raymond Norris
2025년 8월 1일
@Contoso Donoso coming back to this.
As I understand you had
- External program solve a mathematical model,
- Which MATLAB uses the results from to solve equations,
- And the results are feed back to external program
Does the external program launch MATLAB to solve the equations? You mention the ability to launch lots of MATLABs, so I'm gathering these are separate, discrete steps.
How are the results of the solved equations fed back to the external program?
There are several ways MATLAB can make use of the cores on your machine
- multi-threading (which automagically happens)
- multiprocessing (which requires a pool of at least one worker)
If you explain a bit more of the workflow, we can provide a better solution.
- how are "jobs" kicked off (programmatically, with human intervention)
- is this a closed loop (does everything feed back into itself)
- at the core of MATLAB, is there a massive for-loop you'd like sped up
- are jobs serial or parallel (could all MATLABs run at the same time, or do you need to process one-step before processing the next)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!