mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   Yafu (https://www.mersenneforum.org/showthread.php?t=10871)

Andi47 2011-11-21 15:27

[QUOTE=pinhodecarlos;279380]What a pity, I was running this [url=http://www.mersenneforum.org/showpost.php?p=270964&postcount=1225]script[/url] but everytime a new integer is processed yafu starts it at normal priority.[/QUOTE]

One thing I use to to invoke programs like Yafu or the ggfns sievers at idle priority (in windows):

* open a cmd window ("dos window")
* open the task manager and set the cmd task to lowest priority
* start your script from the cmd window - it will now inherit the lowest priority from the cmd window.

important: set your cmd window to lowest priority [I]before[/I] you invoke the script

bsquared 2011-11-21 15:27

[QUOTE=pinhodecarlos;279394]axn, your line doesn't work, dos box closes.
[/QUOTE]

That's surprising... I thought that would be a good solution.

pinhodecarlos 2011-11-21 15:35

[QUOTE=Andi47;279395]One thing I use to to invoke programs like Yafu or the ggfns sievers at idle priority (in windows):

* open a cmd window ("dos window")
* open the task manager and set the cmd task to lowest priority
* start your script from the cmd window - it will now inherit the lowest priority from the cmd window.

important: set your cmd window to lowest priority [I]before[/I] you invoke the script[/QUOTE]

That works but if electricity goes down? I use a batch file on startup folder...

axn 2011-11-21 15:38

[QUOTE=bsquared;279396]That's surprising... I thought that would be a good solution.[/QUOTE]

Perhaps PATH is not properly set (invoking by file association won't have that problem, I guess).

Carlos: Dow you get any error, if you run "perl.exe factordb.pl" from a cmd prompt?

pinhodecarlos 2011-11-21 15:42

[QUOTE=axn;279398]

Carlos: Dow you get any error, if you run "perl.exe factordb.pl" from a cmd prompt?[/QUOTE]

No.

LaurV 2011-11-21 16:02

I tested axn solution on xp/vista 32 and 64 and it works. I created a yoyo.bat in the same folder with the content "start /low perl yoyo.pl" folowed by an CRLF (for me the script is called yoyo.pl) and launched. It works. In task manager, all priorities (for perl and all yafu tasks launched by it) are low.

pinhodecarlos 2011-11-21 17:15

[QUOTE=LaurV;279401]I tested axn solution on xp/vista 32 and 64 and it works. I created a yoyo.bat in the same folder with the content "start /low perl yoyo.pl" folowed by an CRLF (for me the script is called yoyo.pl) and launched. It works. In task manager, all priorities (for perl and all yafu tasks launched by it) are low.[/QUOTE]

Which perl version are you using? I'm using the Strawberry Perl version.

yoyo 2011-11-21 17:17

That is the usual behaviour. Start the parent (perl) with low priority and this priority is inherited by the childs (yafu, gnfs).
yoyo

bsquared 2011-11-22 16:02

version 1.29 now available
 
Lots of requests and bugfixes in this version. NFS poly selection can now be resumed with -R (same as resuming sieving - yafu will automatically determine where to pick up). -nc2, -ncr, and -nc3 are also now supported to resume linear algebra from scratch or from a checkpoint, or resume sqrt.

The sieve of Eratosthenes code underwent a major overhaul. It's now faster and more functional. There are two new functions associated with it: sieverange and testrange. sieverange will sieve an arbitrary range of integers with primes up to a specified bound. It's not meant for really huge inputs, but can quickly remove lots of composites from ranges of integers up to 10^10000 or so (or maybe slightly higher - I haven't done much testing here). Testrange does the same thing but tacks on a PRP test of each candidate that survives the sieving - again, not meant for really huge inputs. Both are multi-threaded.

Also, mac OSX build now work. A big thanks to Mathew Steine for helping me work through the bugs.

[URL="https://sourceforge.net/projects/yafu/"]Link[/URL].

xilman 2011-11-22 16:34

[QUOTE=pinhodecarlos;279382]At this line[code]open(YAFU, "yafu siqs($composite) -threads 2|")[/code] I added start /low but it opens two DOS boxes, yafu runs at idle at first processing but then shutdowns.
Anyway, the script is in perl but I am ignorant, I don't know how to invoke yafu at idle priority.[/QUOTE]Why not start the script at low priority?

AFAIK, a script on most sane operating systems is unable to start sub-processes at a higher priority that the one at which it is running. Unless the script is running under an account with superuser privileges, and surely you're not doing [b]that[/b]!

Paul

bsquared 2011-11-22 16:37

[QUOTE=xilman;279504]Why not start the script at low priority?

AFAIK, a script on most sane operating systems is unable to start sub-processes at a higher priority that the one at which it is running. Unless the script is running under an account with superuser privileges, and surely you're not doing [B]that[/B]!

Paul[/QUOTE]

Posts 951-968 describe methods to do just that.


All times are UTC. The time now is 22:56.

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