mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2021-12-19, 03:42   #34
Citrix
 
Citrix's Avatar
 
Jun 2003

22·397 Posts
Default

Can you compile a generalized version that can work for any base (positive or negative) with no limits on the size of the base (<32 bits). If it does not calculate the remainders (Legendre/Jacobi symbols) that would be fine.

Thanks.
Citrix is offline   Reply With Quote
Old 2021-12-24, 08:18   #35
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

6116 Posts
Default

Quote:
Originally Posted by Citrix View Post
Can you compile a generalized version that can work for any base (positive or negative) with no limits on the size of the base (<32 bits). If it does not calculate the remainders (Legendre/Jacobi symbols) that would be fine.

Thanks.

Hi,
there is no quick way in doing so since the fast GPU assembler routines are only using 32 bit integer multiplication. To extend this to 64 bit exponents one would have to rewrite all the routines which are using the exponent, e.g. mod_192_96() in tf_96bit.cu. I'll have a look into this but won't promise anything.
MrRepunit is offline   Reply With Quote
Old 2021-12-25, 11:26   #36
Citrix
 
Citrix's Avatar
 
Jun 2003

110001101002 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
Hi,
there is no quick way in doing so since the fast GPU assembler routines are only using 32 bit integer multiplication. To extend this to 64 bit exponents one would have to rewrite all the routines which are using the exponent, e.g. mod_192_96() in tf_96bit.cu. I'll have a look into this but won't promise anything.
I appreciate your efforts. I am looking to work on larger 32 bit bases and not larger 64 bit exponents.
For example, the current program cannot handle factoring 10000001^999431+-1
I just wanted to clarify to make sure we were talking about the same thing.
Citrix is offline   Reply With Quote
Old 2021-12-25, 22:54   #37
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

Quote:
Originally Posted by Citrix View Post
I appreciate your efforts. I am looking to work on larger 32 bit bases and not larger 64 bit exponents.
For example, the current program cannot handle factoring 10000001^999431+-1
I just wanted to clarify to make sure we were talking about the same thing.

Okay, your example helped to understand what the problem was:
There was a buffer overflow due to the too long checkpoint file name generated from the base and exponent. I fixed this, see attached checkpoint.c file. Just replace it and recompile. If you need a Linux 64 Bit executable I can provide you with one, but chances are low that it runs on your system anyway.


I hope this helps.
Attached Files
File Type: zip checkpoint.c.zip (1.7 KB, 65 views)
MrRepunit is offline   Reply With Quote
Old 2021-12-26, 21:53   #38
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

I attached the executable for Linux 64 bit (CUDA 11.20).
Code:
$ ./gr-mfaktc.exe -tf 10000001 999431 1 60
mfaktc (generalized repunit edition) v0.21 (64bit built)
Compiled on Dec 25 2021
<snip>
CUDA version info
  binary compiled for CUDA  11.20
  CUDA runtime version      11.20
  CUDA driver version       11.20
<snip>
got assignment: base=10000001 exp=999431 bit_min=1 bit_max=60 (0.15 GHz-days)
Starting trial factoring R[10000001]999431 from 2^1 to 2^60 (0.15 GHz-days)
INFO: No known remainders for base 10000001, falling back to simple trial factoring.
INFO: Testing 1920 out of 4620 classes.
 k_min =  0
 k_max =  576788945213
Using GPU kernel "64bit_mul32_gs"
Date    Time | class   Pct |   time     ETA | GHz-d/day    Sieve  | Exp        Base         bit-range
Dec 26 22:51 | 4618 100.0% |  0.020    n.a. |    345.77    78133  | 999431     10000001     1:60
no factor for R[10000001]999431 from 2^1 to 2^60 [mfaktc 0.21 64bit_mul32_gs]
tf(): total time spent: 40.149s
Attached Files
File Type: zip gr-mfaktc.exe.zip (595.5 KB, 70 views)
MrRepunit is offline   Reply With Quote
Old 2021-12-26, 23:02   #39
mathwiz
 
Mar 2019

27710 Posts
Default

Hi,

What's the link for the latest gr-mfaktc source code, if I want to compile myself for Linux?

Thanks!
mathwiz is offline   Reply With Quote
Old 2021-12-26, 23:18   #40
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3,733 Posts
Default

I keep a mirror of sorts at https://download.mersenne.ca/mfaktc-gr but the most recent update I have is from over a year ago.
James Heinrich is offline   Reply With Quote
Old 2021-12-27, 12:45   #41
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

11000012 Posts
Default

Here is the newest source code with included Linux 64 Bit binary, currently I cannot build a Windows binary. Not much has changed since last year, only the recent bugfix and some minor additional output.
Attached Files
File Type: zip gr-mfaktc-2021-11-27.zip (1.07 MB, 67 views)
MrRepunit is offline   Reply With Quote
Old 2022-05-30, 07:57   #42
Citrix
 
Citrix's Avatar
 
Jun 2003

158810 Posts
Default

Does anyone have a compiled windows version for the latest code? Thanks.
Citrix is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mfaktc: a CUDA program for Mersenne prefactoring TheJudger GPU Computing 3541 2022-04-21 22:37
mfakto: an OpenCL program for Mersenne prefactoring Bdot GPU Computing 1684 2022-04-19 20:25
The P-1 factoring CUDA program firejuggler GPU Computing 753 2020-12-12 18:07
World's second-dumbest CUDA program fivemack Programming 112 2015-02-12 22:51
World's dumbest CUDA program? xilman Programming 1 2009-11-16 10:26

All times are UTC. The time now is 14:16.


Mon Jun 27 14:16:33 UTC 2022 up 74 days, 12:17, 2 users, load averages: 0.92, 1.05, 1.13

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

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