![]() |
|
|
#1266 |
|
Jun 2012
Boulder, CO
32×53 Posts |
|
|
|
|
|
|
#1267 |
|
"Oliver"
Sep 2017
Porta Westfalica, DE
66116 Posts |
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. |
|
|
|
|
|
#1268 |
|
Jun 2012
Boulder, CO
7358 Posts |
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 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);
|
|
|
|
|
|
#1269 |
|
"Mark"
Apr 2003
Between here and the
11100101010102 Posts |
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. |
|
|
|
|
|
#1270 | |
|
Jun 2012
Boulder, CO
32·53 Posts |
Quote:
|
|
|
|
|
|
|
#1271 |
|
"Mark"
Apr 2003
Between here and the
2·3·1,223 Posts |
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. |
|
|
|
|
|
#1272 |
|
"Oliver"
Sep 2017
Porta Westfalica, DE
66116 Posts |
For testing, where would you change the time of one hour to a lower value?
|
|
|
|
|
|
#1273 |
|
Jun 2012
Boulder, CO
1DD16 Posts |
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) |
|
|
|
|
|
#1274 |
|
"Oliver"
Sep 2017
Porta Westfalica, DE
66116 Posts |
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.
|
|
|
|
|
|
#1275 | |
|
"Mark"
Apr 2003
Between here and the
2·3·1,223 Posts |
Quote:
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. |
|
|
|
|
|
|
#1276 |
|
"Mark"
Apr 2003
Between here and the
2×3×1,223 Posts |
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.
|
|
|
|