mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2016-06-30, 14:56   #1
Angular
 
Aug 2002

1101102 Posts
Default Linux Sieving

It appears Newpgen has not been updated in the last decade. What other linux options do we have for sieving in general? In particular for primordials, chains, ...

https://primes.utm.edu/programs/NewPGen/

Last fiddled with by Angular on 2016-06-30 at 15:06
Angular is offline   Reply With Quote
Old 2016-06-30, 18:16   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·33·132 Posts
Default

Each sieve has its own usage domain. For some modes, NewPGen does best even after a decade.

The source is available from jpenne.fr but in order to build it, you need to jump through some hoops. The code is relying on certain 32-bit quirks so it has to be built on a 32-bit linux machine, and with a gcc/g++ 3.x (e.g. 3.4.6). (Such machine can be rented very cheaply on AWS for a couple cents for a couple hours. You need to downgrade gcc - build it from source; no EC2 image has such an old compiler readily.) You also need objconv but it is easy to find (there is a reference in the source). Once you've built it (with optional modifications) as a static binary (make snewpgen), you can scp it from the EC2 node, and use it on any number of machines.

I've played with newpgen to search for unusual quads/quints (e.g. of k*15^n+-2, +-4 form) and for some near factorials/ compositorials. It works quite fine.
Batalov is offline   Reply With Quote
Old 2016-06-30, 18:26   #3
Angular
 
Aug 2002

2·33 Posts
Default

Good point, newpgen may be the best we have now.

I really would love larger memory usage. Breaking sieves up into 30+ units with newpgen each doing 4 sets of full 485mb ranges per unit is simply annoying and suboptimal :) If you let newpgen automatically break into more sets using PROTHGEN.TMP then you get kernel dumps due to large ram usage when attempting to sieve the larger range since it only sieves each 485mb set to p=1 billion.

Newpgen is already complied for linux; so what would be the benefit to recompiling? I would not expect much benefit for haswell cpus given we are forced to use an old version of gcc.

Last fiddled with by Angular on 2016-06-30 at 18:40
Angular is offline   Reply With Quote
Old 2016-06-30, 18:52   #4
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·33·132 Posts
Default

No, recompiling won't change anything. The bottlenecks are already implemented in ASM (SSE2 type, nothing newer), so they won't magically optimize themselves.

Indeed, limits exist and are inherent to the 32-bit code. What you are talking about are the problems with sieving with low p values (under 1G). Yes, they exist. Once you are past these initial bit-arrays with almost all bits cleared and have joined multiple ranges (be that via the default PROTHGEN.TMP files or, more, tediously, with clever external range splitting and preparing perhaps even thousands of small initial jobs with will have their parameters prepared via CLI), you then read the merged file and craft it to be fitting in L cache for each chunk ...and off to very high p sieve values using the sparse array.

Or you write a new sieve. :-) Though it can be done, it is obviously yet another overhead. One has to decide which overhead is bigger.
Batalov is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
QS/NFS Sieving henryzz GPU Computing 5 2011-07-25 13:47
Line sieving vs. lattice sieving JHansen NFSNET Discussion 9 2010-06-09 19:25
Sieving the same Range unter Linux and windows Rincewind Sierpinski/Riesel Base 5 4 2008-01-26 20:47
Sieving ValerieVonck Math 9 2005-08-05 22:31
sieving TTn 15k Search 0 2003-07-11 23:58

All times are UTC. The time now is 08:29.

Mon Sep 28 08:29:18 UTC 2020 up 18 days, 5:40, 0 users, load averages: 1.35, 1.47, 1.40

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.