mersenneforum.org FastECPP software and 50000 digit primality proof (reposted from NMBRTHRY)
 Register FAQ Search Today's Posts Mark Forums Read

 2022-05-16, 18:00 #78 andreas   May 2022 5 Posts Hello, thanks for useful comments in this thread and private emails! Following some of the suggestions, I made a new git snapshot available on the homepage of the CM software at https://www.multiprecision.org/cm/ (notice that the software is called CM, although this is even more generic than fastECPP, which designates the algorithm). When file output of the certificate is chosen, the new version automatically creates a second file in Primo format. And I have added a quick primality test, which can be disabled by passing "-t" on the command line. Concerning Primo format, its documentation states that hexadecimal numbers can be prefixed by \$ or 0x; so software reading Primo certificates should also handle 0x, which I chose in line with PARI/GP. The MPI version now falls into microsleep following a suggestion by Greg Childers, to avoid busy waits, which apparently are disastrous when enabling hyperthreading during the second phase. Notice that the quite efficient parallelisation of ecpp-mpi in the first phase assumes that hyperthreading is disabled - it takes decisions based on the number of effectively available cores. If you are in a situation where you cannot turn off hyperthreading, I would suggest to allocate as many MPI processes per machine as there are real cores. Cheers, Andreas Last fiddled with by andreas on 2022-05-16 at 18:10
 2022-05-16, 18:02 #79 Batalov     "Serge" Mar 2008 Phi(4,2^7658614+1)/2 990110 Posts Welcome, Andreas!
 2022-05-16, 19:07 #80 xilman Bamboozled!     "𒉺𒌌𒇷𒆷𒀭" May 2003 Down not across 2×5,711 Posts As a consequence of my incompetence, the latest git version has an initial probable prime test, and a -t switch to disable that functionality. My thanks to Andreas!
 2022-05-16, 19:35 #81 ixfd64 Bemusing Prompter     "Danny" Dec 2002 California 23·3·103 Posts First of all, welcome! I do have a suggestion regarding this change: https://gitlab.inria.fr/enge/cm/-/co...773c99f1aaecc6 It doesn't really make sense to throw an error on failing the initial primality test because the purpose of this program is to determine whether or not a number is prime. Instead of giving an error message, the program should just indicate that the number is composite.
2022-05-16, 20:32   #82
frmky

Jul 2003
So Cal

243110 Posts

Quote:
 Originally Posted by ixfd64 It doesn't really make sense to throw an error on failing the initial primality test because the purpose of this program is to determine whether or not a number is prime. Instead of giving an error message, the program should just indicate that the number is composite.
I think the error message is appropriate. This program is intended to be used to prove already known probable primes, not test numbers of unknown status. Any input that doesn't pass a PRP test is likely an error.

2022-05-16, 20:45   #83
ixfd64
Bemusing Prompter

"Danny"
Dec 2002
California

23·3·103 Posts

Quote:
 Originally Posted by frmky I think the error message is appropriate. This program is intended to be used to prove already known probable primes, not test numbers of unknown status. Any input that doesn't pass a PRP test is likely an error.
Fair enough. ECPP does stand for elliptic curve primality proving after all.

Last fiddled with by ixfd64 on 2022-05-17 at 04:53

 2022-05-17, 21:28 #84 R. Gerbicz     "Robert Gerbicz" Oct 2005 Hungary 112×13 Posts Used ./configure then make install I have only ecpp in src library, what I can nicely run, using one thread. Why the ecpp.mpi is not compiled??
 2022-05-17, 21:32 #85 kruoli     "Oliver" Sep 2017 Porta Westfalica, DE 2·541 Posts It is necessary to run ./configure --enable-mpi instead.
 2022-05-17, 21:50 #86 ryanp     Jun 2012 Boulder, CO 19816 Posts How sensitive is ecpp-mpi to latency between physical hosts? For example, how much performance degradation would there be if some hosts are 20-30ms from the node on which mpirun ecpp-mpi ... is invoked?
2022-05-17, 22:09   #87
frmky

Jul 2003
So Cal

1001011111112 Posts

Quote:
 Originally Posted by ryanp How sensitive is ecpp-mpi to latency between physical hosts? For example, how much performance degradation would there be if some hosts are 20-30ms from the node on which mpirun ecpp-mpi ... is invoked?
Negligible. It's a server/client framework with comparatively long workunit times implemented using MPI.

2022-05-18, 00:49   #88
paulunderwood

Sep 2002
Database er0rr

22·1,063 Posts
FastECPP + GWNUM

The attached code can be compiled with GWNUM (after that has compiled from P95 source) in the P95 directory

Then make the change to lib/nt.c of CM (FastECCP code):

Code:
int cm_nt_is_prime (mpz_t a) {
char str[60000];
if ( mpz_sizeinbase (a, 2) < 26000 ) { // is 26000 optimal?
return (mpz_probab_prime_p(a, 0)>0);
}
strcat (str, mpz_get_str(NULL, 10, a));
return (system(str));
}
Obviously you'll need your own path for gw_prp!!! I have not tried this on a cluster, but I guess you put the program in the mpi directories.

Note: running this code messes up CM's internal clock -- better to prefix the command with time to get wall time.

I am pretty sure it would be way better if the code was internal to CM instead of making use of system().

Check the sanity of the code!
Attached Files
 gw_prp.c (2.3 KB, 29 views)

Last fiddled with by paulunderwood on 2022-05-19 at 00:23

 Similar Threads Thread Thread Starter Forum Replies Last Post bur GPU Computing 6 2020-08-28 06:20 JonathanM Information & Answers 25 2020-06-16 02:47 f1pokerspeed FactorDB 14 2014-01-09 21:06 princeps Math 15 2012-04-02 21:49 AntonVrba Math 96 2009-02-25 10:37

All times are UTC. The time now is 03:54.

Tue Aug 9 03:54:30 UTC 2022 up 32 days, 22:41, 1 user, load averages: 0.85, 0.98, 0.98