mersenneforum.org  

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

Reply
 
Thread Tools
Old 2022-05-11, 19:16   #45
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

2·3·11·37 Posts
Default

Here's a small change that will allow idle MPI workers to yield their core. I've sent this to Andreas in case he wants to use it. With this change I can use one worker per hyperthread without slowing the end of phase 2.

Code:
--- lib/mpi.c.orig      2022-05-11 10:13:12.940302581 -0700
+++ lib/mpi.c   2022-05-11 11:26:12.823859553 -0700
@@ -555,6 +555,12 @@
    finish = false;
    while (!finish) {
       /* Wait for a message from the server. */
+      int message_ready = 0;
+      MPI_Iprobe(0, MPI_ANY_TAG, MPI_COMM_WORLD, &message_ready, &status);
+      while (!message_ready) {
+         usleep(100);
+         MPI_Iprobe(0, MPI_ANY_TAG, MPI_COMM_WORLD, &message_ready, &status);
+      }
       MPI_Recv (&job, 1, MPI_INT, 0, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
       cm_stat_init (stat);
       switch (status.MPI_TAG) {
frmky is offline   Reply With Quote
Old 2022-05-11, 19:43   #46
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

425310 Posts
Default

I noticed that some numbers stall the program, like (10^79-1)/9. Primo does a BPSW sanity test before ECPP.

@Serge: The 50001 digit ECPP proof is still not in the UTM database. You had better ask Andreas to go through the submission process -- unless CC is on holiday or something.

Last fiddled with by paulunderwood on 2022-05-11 at 19:55
paulunderwood is offline   Reply With Quote
Old 2022-05-11, 20:07   #47
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

990910 Posts
Default

I will write to him. (I've also already invited him to join the forum. There is a good source of debug/improvement cases here for him.)

So far, I had good exchange about the backtrack (indeed, in future plans; at this point the code relies on the fact that it will sooner or later find the step unlike Primo that had finite set of invariants/curves/test units).
Batalov is offline   Reply With Quote
Old 2022-05-11, 20:12   #48
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

11×1,039 Posts
Default

--- Total time for ECPP: 976676.0 (197674.8)
--- Time for ECPP check (true): 15687.0

real 1373m20.172s
user 8416m44.292s
sys 2m44.721s
xilman is online now   Reply With Quote
Old 2022-05-12, 00:23   #49
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

9AD16 Posts
Default

Two more questions:

1. How is ecpp able to generate Primo certificates?

To my knowledge, Primo is closed source. Did the author of ecpp reverse-engineer Primo, or did Martin also contribute code?

2. I checked the source code and noticed that this program is written in pure C. Could it benefit from hand-tuned assembly like Prime95 does?
ixfd64 is online now   Reply With Quote
Old 2022-05-12, 02:18   #50
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

33·367 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
1. How is ecpp able to generate Primo certificates?

To my knowledge, Primo is closed source. Did the author of ecpp reverse-engineer Primo, or did Martin also contribute code?
Implementation is closed source (pssst: it is coded in Pascal for some reason, Primo, that is) but the certificate format is well described and community accepted. It describes the curve and point (partial case, N ยฑ 1 steps, when they apply). That is why Pari/gp validator existed for ages, regardless of a competitive implementation. Markus was using it for years.
Batalov is offline   Reply With Quote
Old 2022-05-12, 03:18   #51
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

2·3·11·37 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
2. I checked the source code and noticed that this program is written in pure C. Could it benefit from hand-tuned assembly like Prime95 does?
It is built on GMP and MPFR, which are well optimized for common architectures.
frmky is offline   Reply With Quote
Old 2022-05-12, 03:36   #52
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2,477 Posts
Default

I see, thanks for the information.

I figured the Primo format was an open specification but didn't see anything about it in the ecpp documentation.

Last fiddled with by ixfd64 on 2022-05-12 at 03:38
ixfd64 is online now   Reply With Quote
Old 2022-05-12, 04:15   #53
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

98A16 Posts
Default

ecpp only outputs Pari/gp format. Pari/gp supports converting that to Primo format.
frmky is offline   Reply With Quote
Old 2022-05-12, 04:17   #54
mathwiz
 
Mar 2019

4478 Posts
Default

This is pretty awesome. An open source ECPP implementation that is fast, pure C, and highly scalable with MPI.

Can't wait to see how this gets extended and improved. Hats off to Andreas!
mathwiz is offline   Reply With Quote
Old 2022-05-12, 05:35   #55
ldesnogu
 
ldesnogu's Avatar
 
Jan 2008
France

10708 Posts
Default

Quote:
Originally Posted by frmky View Post
It is built on GMP and MPFR, which are well optimized for common architectures.
I wonder what proportion of its speed compared to Primo comes from using these highly tuned libs vs ECPP specific algorithmic improvements (all of which are described in available publications, if my very limited understanding is correct).
ldesnogu 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 17:14.


Thu Aug 18 17:14:00 UTC 2022 up 14:42, 0 users, load averages: 1.19, 1.46, 1.54

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.

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