How can i run a script in the background? How can i use more computer resources?

1 回表示 (過去 30 日間)
Tyler
Tyler 2014 年 5 月 11 日
回答済み: Jan 2014 年 5 月 11 日
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.

回答 (2 件)

Image Analyst
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!).

Jan
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.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by