So this should be pretty simple but I can't figure out how. I'm running a set of data analysis functions (basically a lot of parfor loops) that take about four hours to finish. Unfortunately during that time windows goes to sleep and the whole thing breaks. I don't really want to turn of sleep in Windows as I quite like the fact that under ordinary circumstances my machine sleeps after an hour. So what I want to know is if there is anyway to tell matlab to keep windows awake?
Thanks!
well... sort of a conundrum, isn't it...
why not, for instance, extend the sleep-timer(?)...
us
Thanks for that suggestion. I don't really want to do that though as it would imply that my sleep times would have to be longer than the longest analysis I might run. Because my analyses take some time (potentially >12 hours) I might as well turn off the sleep timer.
> > why not, for instance, extend the sleep-timer(?)...
>
> Thanks for that suggestion. I don't really want to do that though as it would imply that my sleep times would have to be longer than the longest analysis I might run. Because my analyses take some time (potentially >12 hours) I might as well turn off the sleep timer.
Usually the sleep time works as an idle timer: the timer starts, when the system load is small only. A computer falling to sleep during a high system load is obviously not a practical idea!
My WindowsXP, MacOS-9 and OS-X, Windows2000 and 95 systems do (did) not fall asleep during calculations. Is your Matlab running on a laptop with a machine specific power management tool?
Kind regards, Jan
> Unfortunately during that time windows goes to sleep and the whole thing breaks.
Another idea: Are you allowed to change the power scheme without admin privilegs? Perhaps this must be enabled by an admin in the group policies.
Then you can disable the sleep timer from Matlab temporarily:
!powercfg /S "Disable shut-off Timers"
<your program>
!powercfg /S Desktop
Perhaps your power schemes have different names. Use this to show the scheme names:
!powercfg /L
See also:
http://support.microsoft.com/kb/324347
Good luck, Jan
Hi,
Yes you would think that the sleep timer shouldn't kick in if the machine is doing something (my windows media pc, for example, doesn't turn off if it's recording or if I'm watching tv). However, in this case it seems that matlab doesn't keep the machine awake (I'm running matlab 2009a on windows 7 - it's a desktop with the normal windows power management).
Hi,
Hi again. Yes this is what I ended up doing. I created a copy of my current power profile but with time to sleep set to infinity. I then found how to set a short cut on the desktop so that I can change between profiles with a single click (which is handy and means I'm more likely to remember to change back). Annoyingly I can't now remember how I did it - something like the shortcut uses the unique id that each power profile is recognised by.