mersenneforum.org mtsieve
 Register FAQ Search Today's Posts Mark Forums Read

2022-12-06, 04:21   #815
rogue

"Mark"
Apr 2003
Between here and the

35·29 Posts

Quote:
 Originally Posted by Citrix I can get the program to work but it is extremely slow without the Legendre tables. Couple of other questions/thoughts 1. I get the following error with the CPU code as well (srsieve2). Can you release a fix. Code: Assertion failed: m <= HASH_MAX_ELTS, file sierpinski_riesel/AbstractSequenceHelper.cpp, line 272 2. For BASE_MULTIPLE there is a limit of 60 ... can this be increased to 256 or higher. 3. Possible bug:- The GPU code seems to crash if the n range is large (~15M); seems to produce false factors if n range is large and LIMIT_BASE is huge. 4. For what type of sequences is it best to use GPU and for which ones should you stick to CPU.
If you are on Windows, I posted a Windows build of srsieve2cl which should resolve that. I haven't committed the code yet.

I will take a look regarding BASE_MULTIPLE. There might be memory considerations if one makes it too large.

Please provide the command line arguments you are using to cause the issue with srsieve2cl. If it is crashing (with no nastygrams), then it is a bug. It is also a bug if it is producing false factors. If this is different input than the crash, then please provide details.

AFAIK, srsieve2cl is always better than any alternative. What GPU are you using? Note that it will be slower for smaller p due to factor validation.

2022-12-06, 10:47   #816
henryzz
Just call me Henry

"David"
Sep 2007
Liverpool (GMT/BST)

605210 Posts

Quote:
 Originally Posted by rogue Here are some relative speeds for the programs. I used S750 from CRUS as the base for the sequences to be tested. I pre-sieved to 1e9. These times (in seconds) are for sieving from 1e9 to 2e9 with default values used for -g and -w. The CPU code ran on i9-11950H and the GPU code ran on NVIDIA RTX A5000. Code:  sr1sieve sr2sieve sr2sieve srsieve2 srsieve2 srsieve2cl srsieve2cl w/Leg wo/Leg w/Leg wo/Leg w/Leg wo/Leg 1 54 n/a n/a 65 218 30 30 10 n/a 247 282 801 994 *** 91 100 n/a 1214 1580 3645 4198 *** 319 *** -> uses generic sieving logic in the GPU, which does not support Legendre tables for multiple sequences 1000 sequences takes much longer, but I expect similar results. In other words srsieve2cl should be faster than anything else. In the future I will add Legendre support in the GPU when using multiple sequences, but I'm not certain how much of a benefit it will have, especially when one has hundreds of sequences.
Is the A5000 mentioned the mobile version? Regardless the cpu and gpu comparison is a little unfair as the cpu is a low power (35 to 45W) and the gpu is one of the best server gpus(although maybe fairly power limited if in a laptop). This may be why others are seeing a much smaller difference between cpus and gpus.

2022-12-06, 13:34   #817
rogue

"Mark"
Apr 2003
Between here and the

35·29 Posts

Quote:
 Originally Posted by henryzz Is the A5000 mentioned the mobile version? Regardless the cpu and gpu comparison is a little unfair as the cpu is a low power (35 to 45W) and the gpu is one of the best server gpus(although maybe fairly power limited if in a laptop). This may be why others are seeing a much smaller difference between cpus and gpus.
You make a good point, but I cannot speak for what others are seeing because I haven't seen others post comparisons.

2022-12-06, 16:38   #818
storm5510
Random Account

Aug 2009
Not U. + S.A.

50628 Posts

Quote:
 Originally Posted by rogue It will be zero upon successful completion. A FatalError (caught and output to the console) is -1. I'm not certain what assert() with exit with. I do not understand why you care. The error code is not output to the console.
If, and only if, somebody wanted to run it in a batch process.

Code:
srsieve2cl -n x -N x -P x "k*2^n+1"
if not errorlevel 0 ....
The OS catches the error code. It does not need to be seen.

2022-12-06, 16:55   #819
rogue

"Mark"
Apr 2003
Between here and the

156078 Posts

Quote:
 Originally Posted by storm5510 If, and only if, somebody wanted to run it in a batch process. Code: srsieve2cl -n x -N x -P x "k*2^n+1" if not errorlevel 0 .... The OS catches the error code. It does not need to be seen.
I see. It should only return 0 upon successful completion, but I haven't verified that.

2022-12-07, 19:13   #820
Happy5214

"Alexander"
Nov 2008
The Alamo City

7·137 Posts

Quote:
 Originally Posted by storm5510 If, and only if, somebody wanted to run it in a batch process. Code: srsieve2cl -n x -N x -P x "k*2^n+1" if not errorlevel 0 .... The OS catches the error code. It does not need to be seen.
I also made a similar request a few months ago for scripting purposes, specifically for a nonzero exit status for interrupted (i.e. SIGINT) sieves. I've developed more robust log parsing in my workflow since then, but an exit code-based solution would only be a couple of lines in Perl.

2022-12-07, 20:16   #821
rogue

"Mark"
Apr 2003
Between here and the

1B8716 Posts

Quote:
 Originally Posted by Happy5214 I also made a similar request a few months ago for scripting purposes, specifically for a nonzero exit status for interrupted (i.e. SIGINT) sieves. I've developed more robust log parsing in my workflow since then, but an exit code-based solution would only be a couple of lines in Perl.
If you try using a script with something built from the framework, but it doesn't work, please let me know and I will look into it. I would not expect the change to be difficult.

 2022-12-07, 23:53 #822 storm5510 Random Account     Aug 2009 Not U. + S.A. 2×32×5×29 Posts I tried running srsieve2cl on a Windows 7 system I have. It has a GTX 1080 in it. An error dialog appeared indicating it was looking for something beginning with "api." I have seen this many times over the years. Doing a simple drive search, these things are in multiple places, but not where the program could find them.
2022-12-08, 04:15   #823
rogue

"Mark"
Apr 2003
Between here and the

1B8716 Posts

Quote:
 Originally Posted by storm5510 I tried running srsieve2cl on a Windows 7 system I have. It has a GTX 1080 in it. An error dialog appeared indicating it was looking for something beginning with "api." I have seen this many times over the years. Doing a simple drive search, these things are in multiple places, but not where the program could find them.
I don't know what it would be looking for. Do you have more details?

2022-12-08, 17:04   #824
storm5510
Random Account

Aug 2009
Not U. + S.A.

2×32×5×29 Posts

Quote:
 Originally Posted by rogue I don't know what it would be looking for. Do you have more details?
If will only display the first one it does not find. Below are some sample names I found.

Code:
api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-console-l1-2-0.dll
api-ms-win-core-datetime-l1-1-0.dll
There are many more. I "think" these may be .Net Framework, but I am not sure.

2022-12-08, 17:26   #825
rogue

"Mark"
Apr 2003
Between here and the

11011100001112 Posts

Quote:
 Originally Posted by storm5510 If will only display the first one it does not find. Below are some sample names I found. Code: api-ms-win-core-console-l1-1-0.dll api-ms-win-core-console-l1-2-0.dll api-ms-win-core-datetime-l1-1-0.dll There are many more. I "think" these may be .Net Framework, but I am not sure.
Okay. I built on Windows 10. I do not have a Windows 7 machine to build on and I'm not certain how to build a Windows 7 compatible binary. If you want to try your own build, then you will need to install this:

Code:
D:\test\done>gcc --version
clang version 14.0.0 (https://github.com/llvm/llvm-project.git 329fda39c507e8740978d10458451dcdb21563be)
Target: x86_64-w64-windows-gnu
InstalledDir: C:/llvm-mingw-20220323-ucrt-x86_64/bin
And an OpenCL SDK. I don't know if the AMD one I have used is still available online, but there are others.

All times are UTC. The time now is 19:18.

Mon Mar 20 19:18:06 UTC 2023 up 214 days, 16:46, 0 users, load averages: 0.82, 1.08, 1.12