mersenneforum.org  

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

Reply
 
Thread Tools
Old 2022-11-17, 23:24   #771
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2·5,651 Posts
Default

Quote:
Originally Posted by SethTro View Post
Better test runner script...
IMO, this is an excellent example of excellent work.

Test the code nine ways to Sunday before you even begin to trust it. Particularly if it is written by oneself (who, heuristically, is prone to mistakes).

Only human... 8-)
chalsall is offline   Reply With Quote
Old 2022-11-18, 10:13   #772
sweety439
 
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36

1110100000012 Posts
Default

@rogue:

Why when click "download" in the page https://sourceforge.net/projects/mtsieve/, it only has "srsieve2cl.exe"? It seems that we should click https://sourceforge.net/projects/mts....3.7z/download to download the full mtsieve
sweety439 is offline   Reply With Quote
Old 2022-11-18, 13:15   #773
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

1C4A16 Posts
Default

Quote:
Originally Posted by sweety439 View Post
@rogue:

Why when click "download" in the page https://sourceforge.net/projects/mtsieve/, it only has "srsieve2cl.exe"? It seems that we should click https://sourceforge.net/projects/mts....3.7z/download to download the full mtsieve
I'm not certain why it does that. After these changes are integrated I will delete any standalone exe files in sourceforge so it should d/l the 7z with all exes.
rogue is online now   Reply With Quote
Old 2022-11-18, 13:17   #774
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

1C4A16 Posts
Default

SethPro, did you output the number of collisions vs inserts in the hash table from those tests? Maybe there are opportunities to sizing the hash table better.
rogue is online now   Reply With Quote
Old 2022-11-18, 18:09   #775
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3·17·71 Posts
Default

Quote:
Originally Posted by SethTro View Post
In two quick checks I saw a 10% improvement in the openCL code by making this one line fix

Code:
    for (idx=0; idx<HASH_SIZE; idx++)
-      h_table[idx] = 0;  
+      h_table[idx] = HASH_ELEMENTS;
I have confirmed the 10% improvement in the OpenCL performance. This is due to choosing a better code path when inserting into the hash table. I was sieving over 3600 at a time.

I have not tested the CPU logic changes yet.
rogue is online now   Reply With Quote
Old 2022-11-22, 18:29   #776
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3·17·71 Posts
Default

I have still not been able to test the CPU changes as I have been busy, but I have uploaded mtsieve 2.3.5 and all executables to sourceforge. Here are the changes:

Code:
   framework:
      Added code to destuctors to free allocated memory.
      Performance updates to HashTable.
      
   srsieve2/srieve2cl: version 1.6.5
      Fixed HashTable usage to get up to 10% better performance.
rogue is online now   Reply With Quote
Old 2022-11-22, 19:58   #777
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

1ED16 Posts
Default

I'm glad these could get integrating.

I wanted to find a few primes in a sequence and I was so happy to find a full feature sieving tool already existed for my problem. My first attempt was single-threaded and missed factors so it was great to find sr2sieve.

I also appreciate that it's fully open source and I could modify and improve it; as I needed this to hack around the all terms being divisible by 2 for (3^n-7)/2.

If you wanted to add a line somewhere that acknowledged optimization/profiling from Seth Troisi, it would make me feel extra valued for the work I did.

Last fiddled with by SethTro on 2022-11-22 at 19:58
SethTro is offline   Reply With Quote
Old 2022-11-22, 23:24   #778
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×3×17×71 Posts
Default

Quote:
Originally Posted by SethTro View Post
I'm glad these could get integrating.

I wanted to find a few primes in a sequence and I was so happy to find a full feature sieving tool already existed for my problem. My first attempt was single-threaded and missed factors so it was great to find sr2sieve.

I also appreciate that it's fully open source and I could modify and improve it; as I needed this to hack around the all terms being divisible by 2 for (3^n-7)/2.

If you wanted to add a line somewhere that acknowledged optimization/profiling from Seth Troisi, it would make me feel extra valued for the work I did.
Sorry about that. I should have added your name to CHANGES.txt. I will update that soon.

The divisible by d sequences need work. I laid out in one of these threads the conditions that must be met for srsieve2/srsieve2cl to sieve such sequences. I just don't recall where it is. That would be a nice contribution if you want to work on it.
rogue is online now   Reply With Quote
Old 2022-11-28, 15:32   #779
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3·17·71 Posts
Default

I have posted mtsieve 2.3.6 to sourceforge. Outside of modifying CHANGES.txt to mention Seth Troisi's addition, here are the changes for 2.3.6:

Code:
   cksieve/cksievecl: version 1.4
      Initial release of cksievecl.
      cksieve will now run on non-x86 CPUs.  It is 25% faster than the previous version.
      cksievecl is about 5x faster than cksieve when comparing i9-11950H vs NVIDIA RTX A5000
The only sieves without ARM builds are afsieve, gcwsieve, pixsieve, xyyxsieve and their OpenCL/Metal equivalents.
rogue is online now   Reply With Quote
Old 2022-11-29, 17:26   #780
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×3×17×71 Posts
Default

I have posted mtsieve 2.3.7 to sourceforge. Here are the changes for 2.3.6:

Code:
   gcwsieve/gcwsievecl: version 1.5
      Added support for non-x86 CPUs.  FPU or AVX is still used on x86 CPUs.
      Added -A to enable AVX on x86 CPUs.  AVX code can be faster than the FPU,
      but you will have to test ranges (for p > max n) to see which is faster.
      Updated invmod method in the GPU and FPU code to gain about 2%.
rogue is online now   Reply With Quote
Old 2022-11-29, 18:05   #781
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

ADB16 Posts
Default

I have an older package. With all due respect, I have not yet seen any good examples of how to use these things.
storm5510 is online now   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 15:15.


Sat Jun 10 15:15:53 UTC 2023 up 296 days, 12:44, 0 users, load averages: 0.60, 0.68, 0.73

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.

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