mersenneforum.org  

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

Reply
 
Thread Tools
Old 2019-01-16, 19:21   #12
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

111510 Posts
Default

Hi,

is it currently known whether this is a Windows only issue or not?
Step(s) to reproduce (I'm not familar with mmff, sorry), please (read: content of worktodo.txt)!

Oliver
TheJudger is offline   Reply With Quote
Old 2019-01-16, 20:29   #13
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

23×3×52 Posts
Default

Quote:
Originally Posted by TheJudger View Post
Hi,

is it currently known whether this is a Windows only issue or not?
Step(s) to reproduce (I'm not familar with mmff, sorry), please (read: content of worktodo.txt)!

Oliver

At this time I do not know if it is a Windows only issue, as I am only interested in building a Windows executable. I am not comfortable with compiling a CUDA executable on Linux (I have managed to bork the updater on Ubuntu fussing around with different versions of CUDA).
The procedure that I took was the following:
0. Downloaded the source files for mmff.
1. Installed the CUDA toolkit and VS 2017 (more specifically, version 15.9.5, as according to the developer command prompt).
2. In the "Makefile.win" file in the mmff source directory, I made the following changes:
- changed the path of the CUDA library to v10.0
- hardcoded the paths to the cl and link executables, so as to build a 64 bit executable
- changed the path of ccbin to point to the correct place
- changed the nvcc flags so as to generate code for CC 3, 3.5, 5, 5.2, 6.1, 7 and 7.5 with flags of the form
Code:
--generate-code arch=compute_61,code=sm_61
with 61 replaced with the appropriate ones for the other versions.
- in CFLAGS, removed
Code:
/I$(CUDA_DIR)\include\cudart
since it doesn't exist in v10.0.
- added

Code:
$(CUDA_DIR)\lib\x64\cuda.lib
to LIBS.
3. Opened up a Developer command prompt (not the x86 version) and ran vcvars64.bat to set up the environment correctly.
4. Changed directory to the mmff source directory and typed "make -f Makefile.win" to compile. This produced the mmff executable in the directory above.
5. To test the new executable, I copied worktodo-test256.txt and pasted it in the same directory as mmff executable (file attached) and renamed it to worktodo.txt. Then I opened a standard command prompt window and invoked the executable. Upon doing this I get the class problems error and the program exits, after it prints out information on the options and CUDA information (output attached).
Attached Files
File Type: txt worktodo.txt (251 Bytes, 234 views)
File Type: txt run_output.txt (1.5 KB, 268 views)
Dylan14 is offline   Reply With Quote
Old 2019-01-16, 20:56   #14
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

5·7·139 Posts
Default

The worktodo.txt file provided by Dylan worked fime on a Windows environment with CUDA 9.0
ET_ is offline   Reply With Quote
Old 2019-01-16, 22:01   #15
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

111510 Posts
Default

Hi,

I hit another error running Linux/CUDA 10.0/Pascal class card/mmff 0.28:
Code:
got assignment: k*2^217+1, k range 16384 to 32767 (232-bit factors)
Starting trial factoring of k*2^217+1 in k range: 16384 to 32767 (232-bit factors)
 k_min = 16384
 k_max = 32767
Using GPU kernel "mfaktc_barrett236_F192_223gs"
Verifying (2^(2^217)) % 4424169372996087413179536342990994861716782957777068163793604166287361 = 152060889755409843197673796971080869046817600431863801929764912112670
    class | candidates |    time |    ETA | raw  rate | SievePrimes | CPU wait
Verifying (2^(2^217)) % 1 = 395774510388988518519647709072058030261971348099740761940
CPU: Verifying (2^(2^217)) % 1 = 0
ERROR: Exponentiation failure
blue = quick & dirty printf() by myself
red = error message

Oliver
TheJudger is offline   Reply With Quote
Old 2019-01-16, 22:20   #16
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

5·223 Posts
Default

Linux/CUDA 9.0/Kepler class card/mmff 0.28:

Code:
./mmff.exe -v 5
[...]
Verifying (2^(2^207)) % 50851644399106225772980820762013261661920854981624131109510820397057 = 38759511289877098222334907209033244200729970748256937262074436741818
Verifying (2^(2^207)) % 47050940247833570117113380692601421333036980815976970020141370703873 = 46672036623841544299852713556387815740475901190361053798830732250712
Verifying (2^(2^207)) % 1 = 6830630433987928161952491935385950349519421325033603328
ERROR: Exponentiation failure
worktodo is:
Code:
FermatFactor=167,1835e6,1836e6
FermatFactor=171,2674670e6,2674671e6
FermatFactor=174,20569e6,20570e6
FermatFactor=180,313e6,314e6
FermatFactor=187,117e6,118e6
FermatFactor=207,131072,262143  ; Keller (1984)
FermatFactor=217,16384,32767    ; Suyama (1980)
Oliver
TheJudger is offline   Reply With Quote
Old 2019-01-19, 19:56   #17
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

21338 Posts
Default

Hello @all,

OK, issue is reproduceable for me on Windows (Win 7/CUDA 10/Maxwell class GPU).
Small joke: The error message is misleading, should be:
Code:
Class problems. Factor divisible by 2, 3, 5, 7, and 11
For the feature I suppose to run in verbose mode, e.g.
Code:
mmff-win-64.exe -v 5
which might help on debugging when talking about this issue(s).

Code:
[...]
got assignment: k*2^167+1, k range 1835000000 to 1836000000 (198-bit factors)
Starting trial factoring of k*2^167+1 in k range: 1835M to 1836M (198-bit factors)
 k_min = 1835000000
 k_max = 1836000000
Using GPU kernel "mfaktc_barrett204_F160_191gs"
Verifying (2^(2^167)) % 0 = 0
ERROR: Class problems.  Factor divisible by 2, 3, 5, 7, or 11
Oliver
TheJudger is offline   Reply With Quote
Old 2019-01-19, 20:32   #18
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

205716 Posts
Default

Oliver: Thanks for taking a look at the problem. I do not have the time (or video card) to look into mmff issues.
Prime95 is offline   Reply With Quote
Old 2019-01-19, 23:26   #19
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

111510 Posts
Default

For now I've no clue what's wrong with mmff-0.28. I've added lots of (temporary) debugging and CUDA error checking - at many (but not all) CUDA kernel invocations I got the "invalid device function" error which often just indicates that someone didn't built the binary for the needed GPU architecture. But I'm pretty sure that this time it is not that simple. I'm really clueless, sorry!

Oliver
TheJudger is offline   Reply With Quote
Old 2019-01-19, 23:51   #20
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
San Diego, Calif.

32×7×163 Posts
Default

It's been years since I last built it, but I remember that there are messages about register usage etc. Check at compile time that they are not containing complaints about 'out of registers' (iirc).



There are a couple "#define"s in the header that allow to unroll loops less aggressively (again, iirc, some of them are at 3, at 4; just guessing that the new architectures may have higher throughput but less registers, or something like that).
Batalov is offline   Reply With Quote
Old 2019-01-20, 00:42   #21
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

23·3·52 Posts
Default

I've attached the output from the compilation of the executable. There doesn't appear to be a 'out of registers' issue like you suggest Serge, but I do see stuff like


Code:
ptxas warning : Value of threads per SM for entry _Z17AdvanceBitToCleariPiPh is out of range. .minnctapersm will be ignored
which interestingly only occurs when it is making the code for compute capacity 7.0. There is also this issue:


Code:
gpusieve.cu(2091): warning C4244: '=': conversion from '__int64' to 'uint32', possible loss of data
Attached Files
File Type: 7z make_output.7z (4.3 KB, 211 views)
Dylan14 is offline   Reply With Quote
Old 2019-01-20, 10:37   #22
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

130116 Posts
Default

Quote:
Originally Posted by TheJudger View Post
Hello @all,

OK, issue is reproduceable for me on Windows (Win 7/CUDA 10/Maxwell class GPU).
Small joke: The error message is misleading, should be:
Code:
Class problems. Factor divisible by 2, 3, 5, 7, and 11
For the feature I suppose to run in verbose mode, e.g.
Code:
mmff-win-64.exe -v 5
which might help on debugging when talking about this issue(s).

Code:
[...]
got assignment: k*2^167+1, k range 1835000000 to 1836000000 (198-bit factors)
Starting trial factoring of k*2^167+1 in k range: 1835M to 1836M (198-bit factors)
 k_min = 1835000000
 k_max = 1836000000
Using GPU kernel "mfaktc_barrett204_F160_191gs"
Verifying (2^(2^167)) % 0 = 0
ERROR: Class problems.  Factor divisible by 2, 3, 5, 7, or 11
Oliver
Does such -v 5 option exist for previous CUDA setups?

How does the line
Code:
Verifying (2^(2^167)) % 0 = 0
appear on such compilations?

Last fiddled with by ET_ on 2019-01-20 at 10:37
ET_ is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
2LMs with exponent divisible by 13 Batalov Cunningham Tables 1 2011-04-14 10:23
5th RPS Drive: 14 Ks < 300 divisible by 3 Kosmaj Riesel Prime Search 756 2008-07-04 12:50
Divisible by a Prime davar55 Puzzles 13 2007-09-12 17:35
Divisible by 7 ? davar55 Puzzles 4 2007-08-09 20:10
Divisible by 7 davar55 Puzzles 3 2007-05-14 22:05

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


Fri Jul 7 15:24:38 UTC 2023 up 323 days, 12:53, 0 users, load averages: 1.56, 1.18, 1.12

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.

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