How to I pass off a Simulink application command syntax to MATLAB Job Scheduler on a local cluster?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a MATLAB/Simulink application that I normally would call from the MATLAB command window with:
app inputfile.m
And then it would run.
If I want to pass that off to the MATLAB Job Scheduler, how would I go about doing that?
I tried following the help documentation about using the cluster profile, creating the parallel job, and then creating the task, except that in the syntax for createTask(j, F, N...)
I tried to put in the "app inputfile.m" as the function into the createTask function and that didn't work.
What would be the better way for me to pass off "app inputfile.m" to MJS?
Your help is greatly appreciated.
Thank you.
0 comentarios
Respuestas (4)
Edric Ellis
el 6 de Sept. de 2019
Where do the results from running app inputfile.m go? Does this create variables directly in the base workspace?
To use app together with createTask, you'd probably need to call it like this:
createTask(job, @app, 0, {'inputfile.m'})
job = batch('app inputfile.m');
wait(job), load(job)
If that does work, then you can simply call batch multiple times.
An alternative might be to use parfor to run app in a parallel loop. But that depends a bit on how the outputs of app are produced...
10 comentarios
Edric Ellis
el 10 de Sept. de 2019
If you're interactively waiting for things to complete, then perhaps the Job Monitor might be the way forward - there you'll be able to see when things are complete.
Programattically - you can either call wait with a timeout, or check job.State to see if it is 'finished'.
Ewen Chan
el 9 de Sept. de 2019
2 comentarios
Jason Ross
el 9 de Sept. de 2019
When you run the installer, make sure that MDCE is selected and it should be there. When you set up the MDCE installation it's a best practice to do an all products install so you can service any inbound request from any arbitrary user.
If you try and backfill files manually it can become a tedious nightmare very quickly -- the installer knows how to do "the right thing".
Ewen Chan
el 10 de Sept. de 2019
4 comentarios
Edric Ellis
el 10 de Sept. de 2019
It is indeed to do with how the 'local' cluster is saving data. But that is derived from your user-level MAT file preferences. If you change your default MAT file version to v7.3, then (unless you specify otherwise), all MAT files created by MATLAB - including those used by the 'local' cluster - will be able to store >= 2Gb. The link I provided should give you instructions as to how to do that.
The reason you don't see this when running your application locally is that the results are returned to you in RAM. Any cluster type has to store the results of a job in some persistent storage somewhere so that you can pick them up later. 'local' uses MAT files on disk for this.
Ver también
Categorías
Más información sobre Manage MATLAB Job Scheduler Processes en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!