How can i run a script in the background? How can i use more computer resources?
1 次查看(过去 30 天)
显示 更早的评论
Hi, i am running a script with 2 outputs:
[X, B] = function(inputs);
which iterates up to about 10^7 times (trying to reach a jamming limit of fitting objects into a bounding volume)
This iteration takes some time, and often when my computer sleeps, the matlab code freezes (i know this because i print the iterations on the screen so i can see it iterating).
Is there any way to submit something like this to run in the background so that it will run overnight? Further, is there any way to use more of my CPUs capacity to speed up the iterations?
Any help would be greatly appreciated.
0 个评论
回答(2 个)
Image Analyst
2014-5-11
Go to Control Panel-> power options and tell your computer not to sleep.
Go to task manager (Ctrl-Shift-Esc) and right click on the process and set the priority to "High" (but never set it to real time or it won't pay attention to other processes like moving the mouse!).
0 个评论
Jan
2014-5-11
Under Windows you can use FEX: WinPower to disable the sleep mode during computations and enable it afterwards or shut down the machine.
To use more "CPU capacity" try to parallelize the code by a parfor loop. Or start multiple instances of Matlab, which process a part of the solution.
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!