mersenneforum.org  

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

Reply
Thread Tools
Old 2023-06-22, 17:20   #1266
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

32·53 Posts
Default

Quote:
Originally Posted by kruoli View Post
Is this with the same command line? Or are you using something with -W or -G?
The fatal error above was with -g 84 -H per your suggestion. I did not pass -G, -W, or -M.
ryanp is offline   Reply With Quote
Old 2023-06-22, 17:22   #1267
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

23×71 Posts
Default

Thanks for the clarification!

In your case (A100) I meant to suggest -g 108 (number of SMs), my example was with my 3090Ti, which has 84 SMs. -H was for increased verbosity.
kruoli is offline   Reply With Quote
Old 2023-06-22, 17:31   #1268
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

32×53 Posts
Default

One more... *hopefully* my last bug report for today.

There also seems to be an issue with the "sparse vs non-sparse" logic. This apparently causes memory corruption when reading lines with -i. For example, I'll see:

Code:
$ ./xyyxsieve -i ./xyyx_1.5M.txt -o test -P 1e12 -W 32
xyyxsieve v2.0, a program to find factors numbers of the form x^y+y^x or x^y-y^x
Fatal Error:  Line 30p46y 557402 is malformed
even though the file itself is perfectly fine. It apparently happens during the second read of ProcessInputTermsFile(); I worked around it by commenting out the "if" block here:

Code:
      ProcessInputTermsFile(false);
      
      // If there are multiple x per y and multiple y per x, then we can use a >
/*      if (il_TermCount > ii_MaxX - ii_MinX && il_TermCount > ii_MaxY - ii_Min>
      {
         iv_Terms.resize(il_TermCount);
         std::fill(iv_Terms.begin(), iv_Terms.end(), false);
      }
      else
      { */
         // Otherwise we use a map
         ib_Sparse = true;
         ip_Terms = (term_t *) xmalloc((1+il_TermCount) * sizeof(term_t));
//      }
         
      il_TermCount = 0;
      
      ProcessInputTermsFile(true);
ryanp is offline   Reply With Quote
Old 2023-06-22, 18:02   #1269
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

162528 Posts
Default

The resize() call should be this in the if condition:

iv_Terms.resize(GetXCount() * GetYCount());

Regarding this error:

Fatal Error: Something is wrong. Counted terms (272597) != expected terms (276672)

Was that after starting with -i? I wonder if they are related. I ask because I don't see anything obviously wrong in the code.

I will consider adding a command line switch to allow the end user to force the sparse logic.

I think I know the cause of your first bug report and have a fix, but it needs to be tested.
rogue is offline   Reply With Quote
Old 2023-06-22, 18:04   #1270
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

32×53 Posts
Default

Quote:
Originally Posted by rogue View Post
The resize() call should be this in the if condition:

iv_Terms.resize(GetXCount() * GetYCount());

Regarding this error:

Fatal Error: Something is wrong. Counted terms (272597) != expected terms (276672)

Was that after starting with -i? I wonder if they are related.
Yes, that was also a run with -i.
ryanp is offline   Reply With Quote
Old 2023-06-22, 18:12   #1271
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

733810 Posts
Default

Quote:
Originally Posted by ryanp View Post
Yes, that was also a run with -i.
Could you run two tests? First with my code change when using -i. Does it still crash after an hour? Second with your code change. Does it crash after an hour?

If neither crash, then the fix I provided most likely addresses the problem.
rogue is offline   Reply With Quote
Old 2023-06-22, 18:16   #1272
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

23·71 Posts
Default

For testing, where would you change the time of one hour to a lower value?
kruoli is offline   Reply With Quote
Old 2023-06-22, 18:27   #1273
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

32·53 Posts
Default

You're right, it does seem to crash after exactly 1 hour.

Code:
$ ./xyyxsievecl  -P 1e12 -g 108 -i ./xyyx_1.5M.txt -o out.txt -H
xyyxsieve v2.0, a program to find factors numbers of the form x^y+y^x or x^y-y^x
GPU primes per worker is 2985984
Sieve started: 2009105977 <= p <= 1e12 with 295337 terms (300000 <= x <= 302000, 150001 <= y <= 159999) (expecting 66376 factors)
  p=0, 0.000 p/sec, 140 factors found at 1.222 f/sec (last 1 min)
  p=0, 0.000 p/sec, 317 factors found at 1.378 f/sec (last 2 min)
  p=2073126071, 16.37K p/sec, 471 factors found at 1.374 f/sec (last 3 min)
  p=2073126071, 12.26K p/sec, 640 factors found at 1.399 f/sec (last 4 min)
...
p=3435438343, 18.25K p/sec, 7301 factors found at 1.018 f/sec (last 59 min), 0
Fatal Error:  Something is wrong.  Counted terms (280490) != expected terms (287868)
ryanp is offline   Reply With Quote
Old 2023-06-22, 18:36   #1274
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

23×71 Posts
Default

One hour is the time when the output file is written for the first time. After the file is written, the data is compared to that was is in memory. If there is a problem with synchronising, it will output the error you have gotten.
kruoli is offline   Reply With Quote
Old 2023-06-22, 21:41   #1275
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

733810 Posts
Default

Quote:
Originally Posted by ryanp View Post
You're right, it does seem to crash after exactly 1 hour.

Code:
$ ./xyyxsievecl  -P 1e12 -g 108 -i ./xyyx_1.5M.txt -o out.txt -H
xyyxsieve v2.0, a program to find factors numbers of the form x^y+y^x or x^y-y^x
GPU primes per worker is 2985984
Sieve started: 2009105977 <= p <= 1e12 with 295337 terms (300000 <= x <= 302000, 150001 <= y <= 159999) (expecting 66376 factors)
  p=0, 0.000 p/sec, 140 factors found at 1.222 f/sec (last 1 min)
  p=0, 0.000 p/sec, 317 factors found at 1.378 f/sec (last 2 min)
  p=2073126071, 16.37K p/sec, 471 factors found at 1.374 f/sec (last 3 min)
  p=2073126071, 12.26K p/sec, 640 factors found at 1.399 f/sec (last 4 min)
...
p=3435438343, 18.25K p/sec, 7301 factors found at 1.018 f/sec (last 59 min), 0
Fatal Error:  Something is wrong.  Counted terms (280490) != expected terms (287868)
Can you use -O to capture factors, then check to see if the number of rows in that file equals starting count - counted terms (when it terminated)?
Can you also check to see if it removed terms in the -o file that don't have factors in the -O file?

This will help me narrow it down. I suspect there might be in overflow in the BIT() macro.

To verify that you can add a printf() to print BIT(ii_MinX, ii_MinY) at the end of ValidateOptions(). If it returns a value less than 2^32, then that is definitely a problem. If it "the problem", I won't until I can spend more time in the code.
rogue is offline   Reply With Quote
Old 2023-06-23, 16:07   #1276
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

162528 Posts
Default

Ryan, I have not been able to reproduce the xyyxsievecl issue. I did make that change that I specified when starting with an old file. If you still have issues, then I will need some more help from you to track down the cause.
rogue is offline   Reply With Quote
Reply



All times are UTC. The time now is 04:17.


Fri Jul 7 04:17:02 UTC 2023 up 323 days, 1:45, 0 users, load averages: 2.11, 1.78, 1.53

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.

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