mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2023-03-10, 13:33   #177
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3·2,447 Posts
Default

Create a .bat file (on Windows) and put this line into that .bat file. Specify the .bat file in prpclient.ini.

I believe that is how it was done by others.
rogue is online now   Reply With Quote
Old 2023-03-10, 14:34   #178
gd_barnes
 
gd_barnes's Avatar
 
"Gary"
May 2007
Overland Park, KS

300816 Posts
Default

Quote:
Originally Posted by rogue View Post
Create a .bat file (on Windows) and put this line into that .bat file. Specify the .bat file in prpclient.ini.

I believe that is how it was done by others.
That's what I've done but it seems cumbersome. Your statement:
Code:
If there is a command line option to llr to generate different residues, then specify that in prpclient.ini.
In other words instead of "llr.exe" use "llr.exe -xxx" where xxx is the command line option.
seems to imply that it could be put directly into the prpclient.ini file.

I had hoped that option had been added. I guess I was mistaken so I'll continue using the .bat file.
gd_barnes is offline   Reply With Quote
Old 2023-03-10, 17:35   #179
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3×2,447 Posts
Default

Quote:
Originally Posted by gd_barnes View Post
That's what I've done but it seems cumbersome. Your statement:
Code:
If there is a command line option to llr to generate different residues, then specify that in prpclient.ini.
In other words instead of "llr.exe" use "llr.exe -xxx" where xxx is the command line option.
seems to imply that it could be put directly into the prpclient.ini file.

I had hoped that option had been added. I guess I was mistaken so I'll continue using the .bat file.
I will look into make a change in the client to handle this.
rogue is online now   Reply With Quote
Old 2023-03-11, 02:32   #180
gd_barnes
 
gd_barnes's Avatar
 
"Gary"
May 2007
Overland Park, KS

110000000010002 Posts
Default

Quote:
Originally Posted by rogue View Post
I will look into make a change in the client to handle this.
That would be excellent. Thanks!
gd_barnes is offline   Reply With Quote
Old 2023-03-11, 19:11   #181
lalera
 
lalera's Avatar
 
Jul 2003

64010 Posts
Default

hi,
https://www.mersenneforum.org/showpo...&postcount=142
lalera is offline   Reply With Quote
Old 2023-03-23, 21:27   #182
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA

2×47×67 Posts
Default

Hi Mark,

I just upgraded a couple of Gary and I's personal PRPNet servers from v5.3.2 to the latest SVN head from Sourceforge (r107, which bumped the version number to 5.4.7 on account of some client-only changes but is equivalent to the officially-released 5.4.6 as far as prpserver is concerned), and we noticed an interesting little SQL issue when attempting to sort by base (b) in Sierpinski/Riesel searches.

Specifically, Gary loaded a server with three one-k CRUS bases, and set sortoption=n,b in prpserver.ini. When clients connected to request work, the server would produce error messages like this on its console:
Code:
[2023-03-23 05:59:05 CDT] 5: ODBC Information: SQL_ERROR: [MySQL][ODBC 3.51 Driver][mysqld-5.0.75-0ubuntu10.5]Column 'b' in order clause is ambiguous
[2023-03-23 05:59:05 CDT] 5: ODBC Information: SQL Statement: select c.CandidateName, c.k, c.b, c.c, c.n   from Candidate c, CandidateGroupStats cgs where c.HasPendingTest = 0    and c.CompletedTests = 0    and c.DecimalLength > 0    and c.k = cgs.k    and c.b = cgs.b    and c.c = cgs.c    and (c.n < cgs.SierpinskiRieselPrimeN or cgs.SierpinskiRieselPrimeN = 0) order by n,abs(b) limit 500
Gary tried a few variations on the SQL statement directly in the MySQL console and confirmed that abs(b) is the problem: it worked fine if he just used b instead. (I'm guessing MySQL is deciding it can be more forgiving there since the bare column names have been rendered unambiguous by the earlier equality constraints, e.g. "c.b = cgs.b".)

I identified the relevant source code change as having been in SVN r38 (between releases 5.3.2 and 5.4.0), which tweaked the sorting code as part of adding support for generic and cyclotomic searches for PRPNet 5.4.0. The references to "b" and "c" in the sorting clause were changed to "abs(b)" and "abs(c)" respectively (prpserver.c lines 651 and 660 in the current SVN HEAD, r107).

Changing those two lines to "abs(c.b)" and "abs(c.c)", respectively, seems to have done the trick and rendered the SQL query unambiguous. With this fix, Gary's server is now working properly in sortoption=n,b mode.

(Probably, "order by c.n,abs(c.b)" would be the ideal syntax here as it would completely remove any potential ambiguity; but "order by n,abs(c.b)" seems to be working well enough given that, as noted above, MySQL seems to have collapsed the identically-named columns as a result of the equality constraints.)

I should note that the NPLB server we're running this on is living with positively ancient software, i.e. its MySQL version is very old (about a decade); so it may be that this issue didn't turn up in previous testing/usage because newer MySQLs might've been A-OK with it. That said, sorting by "b" or "c" is a relatively niche use case, so I can believe that we may be the first ones to actually try it since the 5.4.0 release.

Last fiddled with by mdettweiler on 2023-03-23 at 21:41
mdettweiler is offline   Reply With Quote
Old 2023-03-23, 23:09   #183
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3×2,447 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
Hi Mark,

I just upgraded a couple of Gary and I's personal PRPNet servers from v5.3.2 to the latest SVN head from Sourceforge (r107, which bumped the version number to 5.4.7 on account of some client-only changes but is equivalent to the officially-released 5.4.6 as far as prpserver is concerned), and we noticed an interesting little SQL issue when attempting to sort by base (b) in Sierpinski/Riesel searches.

Specifically, Gary loaded a server with three one-k CRUS bases, and set sortoption=n,b in prpserver.ini. When clients connected to request work, the server would produce error messages like this on its console:
Code:
[2023-03-23 05:59:05 CDT] 5: ODBC Information: SQL_ERROR: [MySQL][ODBC 3.51 Driver][mysqld-5.0.75-0ubuntu10.5]Column 'b' in order clause is ambiguous
[2023-03-23 05:59:05 CDT] 5: ODBC Information: SQL Statement: select c.CandidateName, c.k, c.b, c.c, c.n   from Candidate c, CandidateGroupStats cgs where c.HasPendingTest = 0    and c.CompletedTests = 0    and c.DecimalLength > 0    and c.k = cgs.k    and c.b = cgs.b    and c.c = cgs.c    and (c.n < cgs.SierpinskiRieselPrimeN or cgs.SierpinskiRieselPrimeN = 0) order by n,abs(b) limit 500
Gary tried a few variations on the SQL statement directly in the MySQL console and confirmed that abs(b) is the problem: it worked fine if he just used b instead. (I'm guessing MySQL is deciding it can be more forgiving there since the bare column names have been rendered unambiguous by the earlier equality constraints, e.g. "c.b = cgs.b".)

I identified the relevant source code change as having been in SVN r38 (between releases 5.3.2 and 5.4.0), which tweaked the sorting code as part of adding support for generic and cyclotomic searches for PRPNet 5.4.0. The references to "b" and "c" in the sorting clause were changed to "abs(b)" and "abs(c)" respectively (prpserver.c lines 651 and 660 in the current SVN HEAD, r107).

Changing those two lines to "abs(c.b)" and "abs(c.c)", respectively, seems to have done the trick and rendered the SQL query unambiguous. With this fix, Gary's server is now working properly in sortoption=n,b mode.

(Probably, "order by c.n,abs(c.b)" would be the ideal syntax here as it would completely remove any potential ambiguity; but "order by n,abs(c.b)" seems to be working well enough given that, as noted above, MySQL seems to have collapsed the identically-named columns as a result of the equality constraints.)

I should note that the NPLB server we're running this on is living with positively ancient software, i.e. its MySQL version is very old (about a decade); so it may be that this issue didn't turn up in previous testing/usage because newer MySQLs might've been A-OK with it. That said, sorting by "b" or "c" is a relatively niche use case, so I can believe that we may be the first ones to actually try it since the 5.4.0 release.
Thanks for the bug report. I hadn't used "b" in the sorting, so I hadn't seen it. This actually breaks others servers. I need to make other changes in preserver (using c. on both n and k) and to add the table alias in PrimeWorkSender.cpp in the same function that triggered this issue. I will do some testing and update sourceforge once I know it works.
rogue is online now   Reply With Quote
Old 2023-03-23, 23:51   #184
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA

142328 Posts
Default

Quote:
Originally Posted by rogue View Post
Thanks for the bug report. I hadn't used "b" in the sorting, so I hadn't seen it. This actually breaks others servers. I need to make other changes in preserver (using c. on both n and k) and to add the table alias in PrimeWorkSender.cpp in the same function that triggered this issue. I will do some testing and update sourceforge once I know it works.
Ah yes, I see what you mean. PrimeWorkSender::SelectCandidates() is plugging the order-by constraint into a different select statement in the Sierpinski/Riesel case than in the generic k*b^n+c case, but only the S/R case provides (and needs) the "c." table alias (since the generic case doesn't need to involve the CandidateGroupStats table in the first place). So the change I made would fix the S/R case but break the more common case - whoops!

Glad you pointed this out before I attempted to use my "fixed" build at NPLB! (There's no urgency for me to upgrade the NPLB servers, since 5.3.2 has everything we need for non-conjecture searches, but I'll probably upgrade them all in the near future to avoid technical-debt pileup...)
mdettweiler is offline   Reply With Quote
Old 2023-03-24, 21:24   #185
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA

11000100110102 Posts
Default

Gary and I just noticed another quirk of the new server version: it doesn't refresh the stats on the web pages as often as it used to. Looking at the code, I see this was a change in r104 (5.4.5):
Code:
--- a/source/prpserver.cpp
+++ b/source/prpserver.cpp
@@ -256,7 +256,7 @@
          ReprocessINIFile("prpserver.ini");
 
       // Send e-mail every 1024 seconds (if new primes/PRPs have been reported)
-      if (!(counter & 0x3ff))
+      if (!(counter & 0x3fff))
       {
          timerDBInterface->Connect(3);
Since r104, the stats are updated (and emails sent, etc.) every 16,384 seconds (~4.5 hours) instead of every 1,024 seconds (~17 minutes). Since the comment wasn't changed along with the bitmask, I'm wondering whether this was intentional.

Given that r104 introduced the recent improvements to Sierpinski/Riesel primed-k handling (such that the server now immediately stops handing out tests above a prime on an S/R k, rather than waiting until the next stats refresh to notice this), I can see how it might be less crucial now that the stats be updated frequently. Was there a concern that some heavier-loaded servers might not have time to complete a stats update in the original 17-minute timeframe?

For our own internal usage, I've rebuilt the server with the old bitmask (0x3ff i.e. 1024 seconds), since we liked having the stats more up-to-date and our candidate loads are small enough for the refresh performance to not be an issue. I suppose ideally, this would be a configurable setting in prpserver.ini; but changing the hardcoded value is working well enough for us in the meantime, so this wouldn't be high priority.
mdettweiler is offline   Reply With Quote
Old 2023-03-24, 21:31   #186
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3·2,447 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
Gary and I just noticed another quirk of the new server version: it doesn't refresh the stats on the web pages as often as it used to. Looking at the code, I see this was a change in r104 (5.4.5):
Code:
--- a/source/prpserver.cpp
+++ b/source/prpserver.cpp
@@ -256,7 +256,7 @@
          ReprocessINIFile("prpserver.ini");
 
       // Send e-mail every 1024 seconds (if new primes/PRPs have been reported)
-      if (!(counter & 0x3ff))
+      if (!(counter & 0x3fff))
       {
          timerDBInterface->Connect(3);
Since r104, the stats are updated (and emails sent, etc.) every 16,384 seconds (~4.5 hours) instead of every 1,024 seconds (~17 minutes). Since the comment wasn't changed along with the bitmask, I'm wondering whether this was intentional.

Given that r104 introduced the recent improvements to Sierpinski/Riesel primed-k handling (such that the server now immediately stops handing out tests above a prime on an S/R k, rather than waiting until the next stats refresh to notice this), I can see how it might be less crucial now that the stats be updated frequently. Was there a concern that some heavier-loaded servers might not have time to complete a stats update in the original 17-minute timeframe?

For our own internal usage, I've rebuilt the server with the old bitmask (0x3ff i.e. 1024 seconds), since we liked having the stats more up-to-date and our candidate loads are small enough for the refresh performance to not be an issue. I suppose ideally, this would be a configurable setting in prpserver.ini; but changing the hardcoded value is working well enough for us in the meantime, so this wouldn't be high priority.
I did this because I was running S3 and had many thousands of sequences in the server.

The proper solution would be a configuration setting in prpserver.ini to specify how frequently to do it.
rogue is online now   Reply With Quote
Old 2023-03-25, 00:19   #187
gd_barnes
 
gd_barnes's Avatar
 
"Gary"
May 2007
Overland Park, KS

1229610 Posts
Default

Quote:
Originally Posted by rogue View Post
I did this because I was running S3 and had many thousands of sequences in the server.

The proper solution would be a configuration setting in prpserver.ini to specify how frequently to do it.
A configuration setting would be great! When running PRPnet, I'm often running just a few k-values with tests that take from 15 mins. to 1-2 hours so I'd probably set it to update every 5 mins. I like seeing it up to date. For the public servers at NPLB, updates every 15-20 minutes are good.

Last fiddled with by gd_barnes on 2023-03-25 at 00:23
gd_barnes is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
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
PRPnet mdettweiler No Prime Left Behind 80 2010-02-09 21:31
PRPNet released! rogue Conjectures 'R Us 250 2009-12-27 21:29

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


Fri Jul 7 14:06:35 UTC 2023 up 323 days, 11:35, 0 users, load averages: 1.33, 1.21, 1.16

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

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔