How do I specify the number of workers to be used in my Simulink batch job?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 6 Mär. 2024
Beantwortet: MathWorks Support Team
am 18 Mär. 2024
I am trying to pass in a cluster object to the "batchsim" command and I see that the number of workers used by my simulation job object and the cluster object do not match.
myCluster =
Local Cluster
Properties:
Profile: local
Modified: false
Host: localhost
NumWorkers: 16
NumThreads: 1
simJob =Job
ID: 23
Type: independent
NumWorkers: 1
Username: user
State: running
SubmitDateTime: 27-Feb-2024 16:12:40
StartDateTime:
Running Duration: 0 days 0h 0m 0s
Why does this mismatch exist? Does "batchsim" not use all the workers available in the cluster it occurs on?
Akzeptierte Antwort
MathWorks Support Team
am 18 Mär. 2024
"Batchsim" will have to be instructed specifically to use a certain number of workers from its cluster. In order to do this, please use the "Pool" name-value argument shown in the documentation page of "batchsim".
The "Pool" name-value argument specifies the number of workers you want your simulation job object created by "batchsim" to use.
Please note that if you specify N workers in the "Pool" name-value argument, your cluster will need to have N+1 workers available since the 1 extra worker required will be the one running the batch.
The following line of code should solve this issue:
simJob = batchsim(myCluster, simInputs, "Pool", 15);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Run Multiple Simulations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!