mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2017-07-29, 16:05   #1
patgie
 
Jul 2017

1410 Posts
Default Running prime95 over night then automatically stop/start

Is it possible to set up prime95 to only run during certain hours and then automatically stop/start? Thank you.
patgie is offline   Reply With Quote
Old 2017-07-29, 19:29   #2
thyw
 
Feb 2016
! North_America

23×11 Posts
Default

http://www.mersenneforum.org/showthread.php?t=11584
I haven't tried it, but you could probably use #5 post on windows.

I don't know Powershell, but http://www.mersenneforum.org/showthread.php?t=18322

Or you can try messing around with the prime services ( + sc) and/or taskschd, scripts with bat files.
Other options to consider:
from undoc.txt
Throttle=n
..For example, Throttle=40 means the program will run 40% and be idle 60% of the time.

or maybe LowMemWhileRunning or lower priority


Or by cron http://www.mersenneforum.org/showthread.php?t=11584 for linux


("Time=" hasn't been working since ~25.7, tried it too.)

Last fiddled with by thyw on 2017-07-29 at 19:31
thyw is offline   Reply With Quote
Old 2017-07-29, 21:59   #3
sdbardwick
 
sdbardwick's Avatar
 
Aug 2002
North San Diego County

5×139 Posts
Default

This might help, but doesn't cause the program to exit/restart:
Adjust the start/stop times below and insert into prime.txt
Code:
PauseWhileRunning=* during 08:00-17:00
(Above code will pause Prime95 from 8am to 5pm)

Last fiddled with by sdbardwick on 2017-07-29 at 22:00
sdbardwick is offline   Reply With Quote
Old 2017-07-30, 00:20   #4
patgie
 
Jul 2017

2×7 Posts
Default

Thank you sdbardwick and thyw.

PauseWhileRunning works ok, I would then only have to restart prime95 in the evening.

Is there any way to make PauseWhileRunning day specific, e.g. only pause on certain days?
patgie is offline   Reply With Quote
Old 2017-07-30, 01:11   #5
sdbardwick
 
sdbardwick's Avatar
 
Aug 2002
North San Diego County

5·139 Posts
Default

Quote:
Originally Posted by patgie View Post
Thank you sdbardwick and thyw.

PauseWhileRunning works ok, I would then only have to restart prime95 in the evening.

Is there any way to make PauseWhileRunning day specific, e.g. only pause on certain days?
Yup! undoc.txt in the Prime95 directory lists all of the various options; below is only a portion.
Code:
In rare cases, users have reported the program can interfere with the
performance of some programs such as disk defragmenters and some games.
You can pause the program automatically when these programs are running by
adding this line to prime.txt:
	PauseWhileRunning=prog1[n1],prog2[n2],etc
The [n1], [n2] values are optional and indicate the number of worker threads
to pause when prog1 and prog2 are running.  The default value for n1 and n2
is to pause all worker threads.  Note that the program will pause if the program
name matches any part of the running program's file name.  That is "foobar"
will match "c:\foobar.exe", "C:\FOOBAR\name.exe", and even "C:\myfoobarprog.exe".
Also, if prog1 is "*" the program will pause no matter what.  Examples:
	PauseWhileRunning=*[1] during 6-7/2:00-3:00
	PauseWhileRunning=* during 23:00-24:00 else decomp[1],mygame[2]
The first example pauses one worker thread on Saturday and Sunday between
2AM and 3AM.  The second example pauses all workers between 11PM and 12AM and
pauses 1 worker if decomp is running and 2 if mygame is running.
sdbardwick is offline   Reply With Quote
Old 2017-07-30, 21:10   #6
patgie
 
Jul 2017

2×7 Posts
Default

Thank you sdbardwick it works great, took a while to make it work on 'X' machines but will make things easier.
patgie is offline   Reply With Quote
Old 2017-07-31, 23:20   #7
patgie
 
Jul 2017

2×7 Posts
Default

So despite putting in prime.txt:

V24OptionsConverted=1
WGUID_version=2
StressTester=0
UsePrimenet=0
Windows95Service=0
DialUp=0
V5UserID=ANONYMOUS
HideIcon=0
TrayIcon=1
Left=343
Top=338
Right=1783
Bottom=1097
W1=0 0 1422 339 0 -1 -1 -1 -1
W2=0 339 1422 679 0 -1 -1 -1 -1
PauseWhileRunning=*[1] during 1-5/8:00-18:00

[PrimeNet]
Debug=0
ProxyHost=
ProxyUser=
ProxyPass=
ProxyMask=0


The worker #1 did not go to sleep at 8 in the morning on all of my machines. It only goes to sleep when I stop prime95 and then press continue between 8:00-18:00. It then sleeps until 18:00 and starts working again at 18:00 as expected.

Any idea how to make prime95 pick PauseWhileRunning automatically?

Thank you.
patgie is offline   Reply With Quote
Old 2017-08-01, 04:28   #8
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

22·439 Posts
Default

You might have found a bug.

Ttry the following setting :
"By default, the program will check the PauseWhileRunning list every 10 seconds.
You can adjust the time period with this prime.txt setting:
PauseCheckInterval=n
where n is the number of seconds between checking which programs are running."
to see if it changes something.

Jacob
S485122 is offline   Reply With Quote
Old 2017-08-01, 13:13   #9
thyw
 
Feb 2016
! North_America

5816 Posts
Default Guessing about unkown things

Ok, so i tried the option, with PauseCheckInterval, PauseCheckInterval * or program name, running it as admin, and i even upgraded to 28.10 from 28.7. And every combinaion of these.
Also if i leave out the "during" word it will "sleep forever".
Tried to put it into local.txt, still every combination, no.
Looking at whatsnew: 22.9 introduce this feature, 25.7 enchanted. Oldest i could find is 25.9. Still doesn't work with * or program PauseCheckInterval.
Also trying with CheatEngine (really new to that program too), prime95 definitely has that program string in memory after defined in PauseWhileRunning.
Even the older version does "It only goes to sleep when I stop prime95 and then press continue between 8:00-18:00."
Looking at the source code (the newest i could find was 28.10) - looks like it's in commonb.c from line 2070.
I do not understand most of it, someone who knows what he's doing should look at the code. I can only guess, 2 cents or something, but maybe
Code:
 from 2153
seconds_until_reread = 0;
    IniGetTimedString (INI_FILE, "PauseWhileRunning", buf, sizeof (buf), NULL, &seconds);
    if (seconds && (seconds_until_reread == 0 || seconds < seconds_until_reread))
        seconds_until_reread = seconds;
    parse_pause_info (buf, ALL_WORKERS, FALSE);
(and then the if seconds... section repeats inside a for loop.)
Looks like IniGetTimedString is only specified in one other place (\gwnum\gwini.c/h line 247)
And the last (6th) value for this void function seconds has this comment: /* Return length of time this timed INI setting is good for. */
looks like seconds_until_reread won't change (0) inside lines 1135-2190 (
And only the part of that if and at end 

/* Add the event that fires when the memory settings expire. */

    if (seconds_until_reread)
        add_timed_event (TE_READ_PAUSE_DATA, seconds_until_reread);


So it won't change seconds_until_reread because if both seconds and seconds_until_reread are 0, then true, thus  seconds_until_reread = seconds; or seconds is 0 and seconds < seconds_until_reread then it changes to 0 too. It will always be true.

So it will be (#2180)
 if (seconds_until_reread)
        add_timed_event (TE_READ_PAUSE_DATA, seconds_until_reread);
seconds_until_reread=0 and in commonc.h #440-9 it's event 11 and it's in commonb.c  #2389 

Last fiddled with by thyw on 2017-08-01 at 13:26
thyw is offline   Reply With Quote
Old 2017-08-01, 14:24   #10
patgie
 
Jul 2017

2×7 Posts
Default

Just an update, all my machines went to sleep after running overnight (more than 10 separate instances) as I set them to go to sleep in the morning at 8:00 today using PauseWhileRunning. Not sure why this has not been picked up yesterday but has been the next day. Any ideas?
patgie is offline   Reply With Quote
Old 2017-08-01, 16:01   #11
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

22·439 Posts
Default

One thing that we and the document perhaps forgot to say, or that you did not notice : when changing settings or data in the configuration or work files, it is best to stop Prime95, when you restart it, it reads local.txt, prime.txt and worktodo.txt again.

Jacob
S485122 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
running only at night phillipkwood Software 9 2020-09-25 19:17
Automatically start Prime95 on the mac koekie Software 2 2012-02-06 15:39
Can I just start Prime95 by running torture test? marks9GIMPS Information & Answers 5 2011-06-05 18:44
Start and Stop Prime 95 on Large Groups of Windows XP Machines MarcGetty Software 3 2006-03-07 07:54
Running all TF and P-1 at night JuanTutors Software 7 2004-08-21 13:31

All times are UTC. The time now is 20:13.


Sat Dec 4 20:13:12 UTC 2021 up 134 days, 14:42, 1 user, load averages: 1.93, 1.30, 1.12

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.