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

1 vue (au cours des 30 derniers jours)
Tyler
Tyler le 11 Mai 2014
Réponse apportée : Jan le 11 Mai 2014
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.

Réponses (2)

Image Analyst
Image Analyst le 11 Mai 2014
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 le 11 Mai 2014
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.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by