![]() |
|
|
#34 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
186916 Posts |
Quote:
![]() I found this block of code in Work.cpp: Code:
if (useLLR)
{
if (strstr(line, "is a probable prime"))
{
strcpy(w_WorkUnit[i_CompletedWorkUnits].s_Residue, "PRP");
prpFound = 1;
return true;
}
ptr = strstr(line, "RES64:");
if (ptr)
{
ptr += 7;
endOfResidue = strchr(ptr, '.');
if (!endOfResidue)
{
m_Log->LogMessage("%s: Could not find '.' terminator in [%s]. Is llr broken?", s_WorkSuffix, fileName);
exit(0);
}
*endOfResidue = 0;
strcpy(w_WorkUnit[i_CompletedWorkUnits].s_Residue, ptr);
}
else
{
m_Log->LogMessage("%s: Could not find RES64 residue [%s]. Is llr broken?", s_WorkSuffix, fileName);
exit(0);
}
}
Code:
3*2^54323-1 is not prime. LLR Res64: CAF8C7B1A533B371 Time : 5.736 sec. 3*2^54324+1 is not prime. Proth RES64: 630878F508F488B0 Time : 5.925 sec. 3*3^54324+1 is not prime. RES64: A87CCA3A88CF549B. OLD64: DCA13E0E801D9166 Time : 74.396 sec. There is also a similar bug regarding primes found on power-of-2 bases with LLR. PRPnet, as can be seen in the following selection from Work.cpp, looks for the text "is a probable prime" in lresults.txt to determine primality: Code:
if (strstr(line, "is a probable prime"))
{
strcpy(w_WorkUnit[i_CompletedWorkUnits].s_Residue, "PRP");
prpFound = 1;
return true;
}
I'll see if I can come up with a band-aid fix, though it will probably be very kludgy since I don't know C++. (Or I guess I could just wait for Rogue to fix it. )Max
Last fiddled with by mdettweiler on 2008-12-30 at 19:56 Reason: typo |
|
|
|
|
|
|
#35 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
426710 Posts |
Quote:
Edit: Ah, here it is, the readme.txt file in the client folder: Code:
llrexe= This is the LLR executable that will be used to perform
a PRP test.
phrotexe= This is the Phrot execuate that will be used to perform
a PRP test.
If both llrexe and phrotexe are specified, then llrexe will be used when
the base is a power of 2 and prp will be used for all other bases.
Last fiddled with by Mini-Geek on 2008-12-30 at 20:17 |
|
|
|
|
|
|
#36 |
|
Mar 2007
Austria
2·151 Posts |
The fix:
In Work.cpp: 1) Change line #394 to: if (strstr(line, "is prime!")) 2) Change line #401 to: ptr = strstr(line, "LLR Res64:"); 3)Change line #405 to: endOfResidue = strstr(ptr, " Time :"); Edit:still problems: server doesn't get residue. nugget Last fiddled with by nuggetprime on 2008-12-30 at 20:24 Reason: Changed fix! |
|
|
|
|
|
#37 | ||
|
A Sunny Moo
Aug 2007
USA (GMT-5)
3·2,083 Posts |
Quote:
Quote:
I've put together a fix that I *think* is complete for all possible scenarios; I'll post it here after I've tested it a bit more.
|
||
|
|
|
|
|
#38 |
|
Mar 2007
Austria
2·151 Posts |
Got the first PRP with PRPnet:
39638582*3^75684-1 is PRP!
|
|
|
|
|
|
#39 |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
141518 Posts |
Congratulations!
I'll go check the server shortly now to see exactly how it outputs results when it finds a PRP, so I know how I need to write my Perl script. I've already checked this using my local server setup, but I'd like to see it in a "real" environment for confirmation. ![]() In other news, I've tested my kludgy fix to Work.cpp and it seems to work fine, for Riesel numbers at least. (I haven't tested it with Proth or non-power-of-2 numbers.) I've attached the fixed prpclient binary to this message, along with the source. (Note: if you want to compile the source yourself, be sure to run "make" with the -k and -i command line flags. Otherwise it will refuse to build due to my terrible C++ code. )
|
|
|
|
|
|
#40 |
|
Mar 2007
Austria
2·151 Posts |
For me it works without these options.
|
|
|
|
|
|
#41 |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
186916 Posts |
Hmm...I guess your system's make must be a little more lenient than mine.
Out of curiosity, what distro are you using?In other news: I've just about completed my PRPnet-to-LLRnet results converter script. It awaits final testing...after lunch.
|
|
|
|
|
|
#42 |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
I'll investigate the base 2 issues and post a fix later.
|
|
|
|
|
|
#43 |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
This is a bug in LLR. The PRPNet client does not write to the work*.out file.
I have attached PRPNet 1.0.1. It now correctly handles base 2 results from LLR. Of note phrot base 2 residues do not match up to LLR base 2 residues. I will have to see how LLR does base 2 tests and see if I can get phrot to do the same. I make no promises. Here is what I've added to history.txt Code:
Version 1.0.1: December 2008 - Patch Release
prpclient: LLR output for base 2 tests differs from other bases, thus it has
to be parsed differently.
LLR for Proth numbers (k*2^n+1) performs a primality test, thus
check for primality and report the number as prime instead of
as a PRP.
prpserver: Check for numbers marked as Prime by LLR.
Last fiddled with by rogue on 2008-12-30 at 23:26 |
|
|
|
|
|
#44 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
3·2,083 Posts |
Quote:
For example, if you run the PRP program (the predecessor to LLR), which does PRP tests on everything, including base 2 (like Phrot), the residuals it produces will be identical to Phrot's. |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PRPNet 5.4.3 Released | rogue | Software | 178 | 2021-06-24 11:56 |
| PSP goes prpnet | ltd | Prime Sierpinski Project | 86 | 2012-06-06 02:30 |
| PRPNet 4.0.0 Released | rogue | Software | 84 | 2011-11-16 21:20 |
| PRPNet 4.0.1 Released | Joe O | Sierpinski/Riesel Base 5 | 1 | 2010-10-22 20:11 |
| PRPNet 3.0.0 Released | rogue | Conjectures 'R Us | 220 | 2010-10-12 20:48 |