mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > And now for something completely different

Reply
 
Thread Tools
Old 2022-05-16, 18:00   #78
andreas
 
May 2022

58 Posts
Default

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
andreas is offline   Reply With Quote
Old 2022-05-16, 18:02   #79
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

3×19×173 Posts
Default

Welcome, Andreas!
Batalov is offline   Reply With Quote
Old 2022-05-16, 19:07   #80
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2×3×7×271 Posts
Default

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!
xilman is offline   Reply With Quote
Old 2022-05-16, 19:35   #81
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2,467 Posts
Default

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.
ixfd64 is offline   Reply With Quote
Old 2022-05-16, 20:32   #82
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

2·11·109 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
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.
frmky is online now   Reply With Quote
Old 2022-05-16, 20:45   #83
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2,467 Posts
Default

Quote:
Originally Posted by frmky View Post
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
ixfd64 is offline   Reply With Quote
Old 2022-05-17, 21:28   #84
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

112·13 Posts
Default

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??
R. Gerbicz is offline   Reply With Quote
Old 2022-05-17, 21:32   #85
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

24·5·13 Posts
Default

It is necessary to run ./configure --enable-mpi instead.
kruoli is offline   Reply With Quote
Old 2022-05-17, 21:50   #86
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

2×199 Posts
Default

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?
ryanp is offline   Reply With Quote
Old 2022-05-17, 22:09   #87
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

239810 Posts
Default

Quote:
Originally Posted by ryanp View Post
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.
frmky is online now   Reply With Quote
Old 2022-05-18, 00:49   #88
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

101628 Posts
Default 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);
   }
   strcpy (str, "/home/paul/Downloads/p95/gw_prp "); // note the space
   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
File Type: c gw_prp.c (2.3 KB, 27 views)

Last fiddled with by paulunderwood on 2022-05-19 at 00:23
paulunderwood is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
For which types of primes is GPU primality test software available? bur GPU Computing 6 2020-08-28 06:20
Fastest software for Mersenne primality test? JonathanM Information & Answers 25 2020-06-16 02:47
APR-CL as primality proof f1pokerspeed FactorDB 14 2014-01-09 21:06
Proof of Primality Test for Fermat Numbers princeps Math 15 2012-04-02 21:49
PRIMALITY PROOF for Wagstaff numbers! AntonVrba Math 96 2009-02-25 10:37

All times are UTC. The time now is 06:25.


Sun Jul 3 06:25:23 UTC 2022 up 80 days, 4:26, 0 users, load averages: 0.97, 0.99, 1.07

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

โ‰  ยฑ โˆ“ รท ร— ยท โˆ’ โˆš โ€ฐ โŠ— โŠ• โŠ– โŠ˜ โŠ™ โ‰ค โ‰ฅ โ‰ฆ โ‰ง โ‰จ โ‰ฉ โ‰บ โ‰ป โ‰ผ โ‰ฝ โŠ โŠ โŠ‘ โŠ’ ยฒ ยณ ยฐ
โˆ  โˆŸ ยฐ โ‰… ~ โ€– โŸ‚ โซ›
โ‰ก โ‰œ โ‰ˆ โˆ โˆž โ‰ช โ‰ซ โŒŠโŒ‹ โŒˆโŒ‰ โˆ˜ โˆ โˆ โˆ‘ โˆง โˆจ โˆฉ โˆช โจ€ โŠ• โŠ— ๐–• ๐–– ๐–— โŠฒ โŠณ
โˆ… โˆ– โˆ โ†ฆ โ†ฃ โˆฉ โˆช โŠ† โŠ‚ โŠ„ โŠŠ โŠ‡ โŠƒ โŠ… โŠ‹ โŠ– โˆˆ โˆ‰ โˆ‹ โˆŒ โ„• โ„ค โ„š โ„ โ„‚ โ„ต โ„ถ โ„ท โ„ธ ๐“Ÿ
ยฌ โˆจ โˆง โŠ• โ†’ โ† โ‡’ โ‡ โ‡” โˆ€ โˆƒ โˆ„ โˆด โˆต โŠค โŠฅ โŠข โŠจ โซค โŠฃ โ€ฆ โ‹ฏ โ‹ฎ โ‹ฐ โ‹ฑ
โˆซ โˆฌ โˆญ โˆฎ โˆฏ โˆฐ โˆ‡ โˆ† ฮด โˆ‚ โ„ฑ โ„’ โ„“
๐›ข๐›ผ ๐›ฃ๐›ฝ ๐›ค๐›พ ๐›ฅ๐›ฟ ๐›ฆ๐œ€๐œ– ๐›ง๐œ ๐›จ๐œ‚ ๐›ฉ๐œƒ๐œ— ๐›ช๐œ„ ๐›ซ๐œ… ๐›ฌ๐œ† ๐›ญ๐œ‡ ๐›ฎ๐œˆ ๐›ฏ๐œ‰ ๐›ฐ๐œŠ ๐›ฑ๐œ‹ ๐›ฒ๐œŒ ๐›ด๐œŽ๐œ ๐›ต๐œ ๐›ถ๐œ ๐›ท๐œ™๐œ‘ ๐›ธ๐œ’ ๐›น๐œ“ ๐›บ๐œ”