mersenneforum.org  

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

Reply
 
Thread Tools
Old 2021-10-25, 17:46   #584
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×5×647 Posts
Default

Quote:
Originally Posted by ryanp View Post
I've tried a number of combinations of -G and -g, ranging from "-g 16" up to "-G 8 -g 288". No matter what, it always tops out around 9.7 or 9.8M p/sec.

This is pretty surprising (the A100 has a max 19.5 TFlop/s single precision) considering I can easily get higher than that with 48 workers on a Xeon.
I have used -g500 (no -G). It is unlikely that the GPU is the bottleneck.
rogue is offline   Reply With Quote
Old 2021-10-25, 18:24   #585
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

33610 Posts
Default

Quote:
Originally Posted by rogue View Post
I have used -g500 (no -G). It is unlikely that the GPU is the bottleneck.
I've tested "-g 72", "-g 144", "-g 600" and for fun, "-g 6192". All produce about 7.5M to 8M p/sec.

With "-G 2" or "-G 4" added in as well, i can get up to about 9.5 to 9.8M p/sec, but no higher.
ryanp is offline   Reply With Quote
Old 2021-10-25, 18:25   #586
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

72×31 Posts
Default

Quote:
Originally Posted by ryanp View Post
On a Tesla A100, I couldn't get srsieve2cl to go much above 9 to 10M p/sec, after fiddling with values for a while. By comparison, a plain ./srsieve2 -W 48 on a 72-core Xeon CPU gives me about 15M p/sec.
Just for curiosity that is is how many k/n pairs, so what is the #k * (nmax-nmin) ?
R. Gerbicz is offline   Reply With Quote
Old 2021-10-26, 04:46   #587
Citrix
 
Citrix's Avatar
 
Jun 2003

5·317 Posts
Default

Quote:
Originally Posted by rogue View Post
I have used -g500 (no -G). It is unlikely that the GPU is the bottleneck.
The "Sieve of Eratosthenes" code becomes a bottle neck around 10-15 Mp/sec.

Last fiddled with by Citrix on 2021-10-26 at 04:46
Citrix is online now   Reply With Quote
Old 2021-10-26, 10:27   #588
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2×2,969 Posts
Default

Have you tried multiple instances of mtsieve?
henryzz is offline   Reply With Quote
Old 2021-10-26, 12:41   #589
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

145068 Posts
Default

Quote:
Originally Posted by Citrix View Post
The "Sieve of Eratosthenes" code becomes a bottle neck around 10-15 Mp/sec.
I use primesieve as the prime generator. Maybe it could be used in a more efficient manner.
rogue is offline   Reply With Quote
Old 2021-10-27, 03:02   #590
Citrix
 
Citrix's Avatar
 
Jun 2003

5×317 Posts
Default

Quote:
Originally Posted by rogue View Post
I use primesieve as the prime generator. Maybe it could be used in a more efficient manner.
The license prevents us from changing the code. You could write a faster Sieve of Eratosthenes if you let a few composites slip through.

Quote:
Originally Posted by henryzz View Post
Have you tried multiple instances of mtsieve?
You can get 60MP/sec for 4 cores.
Citrix is online now   Reply With Quote
Old 2021-11-02, 00:40   #591
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

23×97 Posts
Default

Would it be possible for mtsieve to return with a non-zero exit code if it was terminated manually (i.e. with SIGINT)? I have several shell scripts for the older srsieve family of programs that have that behavior, and it's useful to know whether the range completed (particularly when it comes to determining whether or not to update a sieve progress control file, which I currently have to revert manually to the old value if I manually kill an mtsieve-family sieve program).

---------

Quote:
Originally Posted by Citrix View Post
The license prevents us from changing the code. You could write a faster Sieve of Eratosthenes if you let a few composites slip through.
Assuming https://github.com/kimwalisch/primesieve is the same library, what stops you from forking it and modifying it? It's under a 2-clause BSD license, one of the most liberal FOSS licenses there is.

Last fiddled with by Happy5214 on 2021-11-02 at 00:44 Reason: Attach reply to previous post
Happy5214 is offline   Reply With Quote
Old 2021-11-02, 12:49   #592
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×5×647 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
Would it be possible for mtsieve to return with a non-zero exit code if it was terminated manually (i.e. with SIGINT)? I have several shell scripts for the older srsieve family of programs that have that behavior, and it's useful to know whether the range completed (particularly when it comes to determining whether or not to update a sieve progress control file, which I currently have to revert manually to the old value if I manually kill an mtsieve-family sieve program).

---------

Assuming https://github.com/kimwalisch/primesieve is the same library, what stops you from forking it and modifying it? It's under a 2-clause BSD license, one of the most liberal FOSS licenses there is.
The output when abnormally terminated has the string "Interrupted" in the text, e.g. "2021-10-01 13:16:49: Sieve interrupted at p=26666330822323". Can you parse the output to determine that it was stopped without completing the range?

The challenge is that the framework was designed around slower sieves, ones where each chunk of work takes much more time to process than getting the "chunk of work". This applies to most sieves. It doesn't work as well for faster sieves or computers with many/many cores where one wants a worker per core.

A "chunk of work" means a fixed number of primes, not a fixed range of primes. With the former, there is a mutex around the code getting the primes so that no two workers work on the same primes and so that each worker has the optimal number of primes for its looping logic.

I could change this to a "fixed range of primes". This is slightly less efficient for the worker threads, but significantly reduces the scope of the mutex.
rogue is offline   Reply With Quote
Old 2021-11-07, 03:11   #593
Citrix
 
Citrix's Avatar
 
Jun 2003

5·317 Posts
Default

Quote:
Originally Posted by Happy5214 View Post

Assuming https://github.com/kimwalisch/primesieve is the same library, what stops you from forking it and modifying it? It's under a 2-clause BSD license, one of the most liberal FOSS licenses there is.
It was under a different license before.
Maybe this would be helpful:-
https://github.com/curtisseizert/CUDASieve
Citrix is online now   Reply With Quote
Old 2021-11-07, 21:34   #594
matzetoni
 
matzetoni's Avatar
 
Feb 2019

1368 Posts
Default

> gfndsievecl.exe -n22001 -N25000 -k2000000 -K3000000 -o"out1.txt"

I tried running above input with the newest mtsieve version 2.2.2.7 and the program just exits after 5 minutes with no output / error in log file written.
matzetoni is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 08:29.


Sun Dec 5 08:29:37 UTC 2021 up 135 days, 2:58, 0 users, load averages: 1.61, 1.63, 1.59

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