mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   mfaktc: a CUDA program for Mersenne prefactoring (https://www.mersenneforum.org/showthread.php?t=12827)

ixfd64 2019-04-16 16:46

c10ck3r came up with an interesting idea over at the mfakto thread: [url]https://mersenneforum.org/showpost.php?p=513787&postcount=1511[/url]

If an exponent already has P-1 done, then we can use the bounds to eliminate any smooth factor candidates and save up to around 26% of the sieving. Would this be hard to implement?

SethTro 2019-04-17 21:44

Hey!

I've recently started on poking around in mkfactc, I was curious about what made mkfactc so much faster than my sieving program. I think I can help out with a couple of features, code cleanups, and maybe even a speedup around gcd.

I've already written a couple of patches around verification[1], support for small exponents[2], general cleanups[3]). I don't see a github repository for mkfactc, what's the appropriate way to get it touch with the active developers?


[1] [url]https://mersenneforum.org/showpost.php?p=513728&postcount=151[/url]
[2] [url]https://github.com/sethtroisi/mfaktc/commit/f81b34fa478258f89ad92c94bbbea8c1ecfe59ab[/url]
[3] [url]https://github.com/sethtroisi/mkfactc/compare/base_upstream...upstream[/url]

kriesel 2019-04-17 23:03

[QUOTE=SethTro;513988]Hey!

I've recently started on poking around in [I]mkfactc[/I], I was curious about what made [I]mkfactc[/I] so much faster than my sieving program. I think I can help out with a couple of features, code cleanups, and maybe even a speedup around gcd.

I've already written a couple of patches around verification[1], support for small exponents[2], general cleanups[3]). I don't see a github repository for [I]mkfactc[/I], what's the appropriate way to get it touch with the active developers?

[1] [URL]https://mersenneforum.org/showpost.php?p=513728&postcount=151[/URL]
[2] [URL="https://github.com/sethtroisi/mfaktc/commit/f81b34fa478258f89ad92c94bbbea8c1ecfe59ab"]https://github.com/sethtroisi/[B]mfaktc[/B]/commit/f81b34fa478258f89ad92c94bbbea8c1ecfe59ab[/URL]
[3] [URL="https://github.com/sethtroisi/mkfactc/compare/base_upstream...upstream"]https://github.com/sethtroisi/[I]mkfactc[/I]/compare/base_upstream...upstream[/URL][/QUOTE]
1) It's [B]mfaktc[/B], not [I]mkfactc[/I]
2) Repositories (sourceforge, github, mirrors) and other info for the various software titles are documented in the attachment at post 2 of [URL]https://www.mersenneforum.org/showthread.php?t=23371[/URL]
3) To my knowledge, [B]mfaktc[/B] and other GIMPS trial factoring programs do not use gcd. At all. (P-1 factoring uses gcd.)
4) Your third link, [3] above, gave a 404 error
5) I don't recall the details, but I think there's more to supporting p<100000 than your second link shows. The discussion of those details is probably somewhere months back in the mfaktc thread here.
6) I've been for a while writing and revising a summary of trial factoring concepts, with a distinctly mfaktc oriented flavor. It's at post 6 of [URL]https://www.mersenneforum.org/showthread.php?t=23386[/URL] and was updated again today.
7) There's a considerable backlog of ideas for improving or updating mfaktc, including for taking full advantage of recently released gpu models. And the author had a prerelease version v0.22 already years ago. Please combine forces with him for efficiency and so you're not working at cross purposes.
8) Welcome.

SethTro 2019-04-18 20:29

[QUOTE=kriesel;513995]1) It's [B]mfaktc[/B], not [I]mkfactc[/I]
2) Repositories (sourceforge, github, mirrors) and other info for the various software titles are documented in the attachment at post 2 of [URL]https://www.mersenneforum.org/showthread.php?t=23371[/URL]
3) To my knowledge, [B]mfaktc[/B] and other GIMPS trial factoring programs do not use gcd. At all. (P-1 factoring uses gcd.)
4) Your third link, [3] above, gave a 404 error
5) I don't recall the details, but I think there's more to supporting p<100000 than your second link shows. The discussion of those details is probably somewhere months back in the mfaktc thread here.
6) I've been for a while writing and revising a summary of trial factoring concepts, with a distinctly mfaktc oriented flavor. It's at post 6 of [URL]https://www.mersenneforum.org/showthread.php?t=23386[/URL] and was updated again today.
7) There's a considerable backlog of ideas for improving or updating mfaktc, including for taking full advantage of recently released gpu models. And the author had a prerelease version v0.22 already years ago. Please combine forces with him for efficiency and so you're not working at cross purposes.
8) Welcome.[/QUOTE]

1) A silly mistake I keep making.
2) Thanks for keeping track of all this information. In this case I did look at that resource. it has two links for mfaktc one is broken and the other is this thread.
3) I have a plan for a fast GPU implementation that I want to combine with the GPU sieve.
4) Yep it was another instance of me misspelling mfaktc. Correctly link is [url]https://github.com/sethtroisi/mfaktc/compare/base_upstream...upstream[/url]

5) I'd love more details. I added 180 testcases and tested 500 more know factors and my branch finds them all. I also tried to search this thread but it's several thousand posts...

6) Thanks again for collecting and curated this information. I've seen many of your posts and learned a lot reading them. I'll reread #6

[QUOTE]7) There's a considerable backlog of ideas for improving or updating mfaktc, including for taking full advantage of recently released gpu models. And the author had a prerelease version v0.22 already years ago. Please combine forces with him for efficiency and so you're not working at cross purposes.
[/QUOTE]

That's what I'm excited about and why I'm reaching out :)

chalsall 2019-04-18 22:37

[QUOTE=SethTro;514061]1) A silly mistake I keep making.[/QUOTE]

Silly mistakes are part of being human.

I must apologize for being rather stupid here recently, and causing offense.

This is not an excuse, but I'm under a little bit of pressure at the moment. Working on something which is rather important.

Interacting with other very intense individuals helps me channel my focus, but I understand and appreciate that not everyone understands or appreciates what I'm doing.

Sorry for being an ass. Sincerely.

Prime95 2019-04-18 23:28

[QUOTE=chalsall;514067] Working on something which is rather important.

Sorry for being an ass. Sincerely.[/QUOTE]

Thanks and welcome back.

Good luck with your stressful project.

kriesel 2019-04-19 03:18

[QUOTE=SethTro;514061]1) A silly mistake I keep making.[/QUOTE] Silly mistakes and their close kin stupid questions are my favorites. They're generally the easiest to address. ;)[QUOTE]
2) Thanks for keeping track of all this information. In this case I did look at that resource. it has two links for mfaktc one is broken and the other is this thread.
[/QUOTE]Glad it's useful. I'll check those links.[QUOTE]

3) I have a plan for a fast GPU implementation that I want to combine with the GPU sieve.
4) Yep it was another instance of me misspelling mfaktc. Correctly link is [URL]https://github.com/sethtroisi/mfaktc/compare/base_upstream...upstream[/URL]

5) I'd love more details. I added 180 testcases and tested 500 more know factors and my branch finds them all. I also tried to search this thread but it's several thousand posts...[/QUOTE]Read it a little at a time and take notes as you go. It pays off. For example, re lower p bound, see Laurv's post at [URL]https://www.mersenneforum.org/showpost.php?p=470996&postcount=2735[/URL]
[QUOTE]6) Thanks again for collecting and curated this information. I've seen many of your posts and learned a lot reading them. I'll reread #6 [/QUOTE]My posts are easy to find, since there are so many.

(re collaborating and making headway on the considerable backlog of enhancement ideas):[QUOTE]That's what I'm excited about and why I'm reaching out :)[/QUOTE]Please consider backporting mfakto's approach to more-classes/less-classes if practical. It would cut down on the number of flavors of mfaktc needed, to have it be an ini file entry as I recall mfakto does. Here's what that looks like in the mfakto ini file:[CODE]# MoreClasses is a switch for defining if 420 (2*2*3*5*7) or 4620 (2*2*3*5*7*11) classes of
# factor candidates should be used. Normally, 4620 gives better results but for very small classes
# 420 reduces the class initialization overhead enough to provide an overall benefit.
# Used only when sieving on the GPU; the CPU-sieve will always use 4620 classes.
#
# Possible values:
# MoreClasses=0 (use 420 classes)
# MoreClasses=1 (use 4620 classes)
#
# Default: MoreClasses=1

MoreClasses=1
[/CODE]And one of my priority wishlist items is user-optional reduction of screen output independently of selecting moreclasses or lessclasses. See [URL]https://mersenneforum.org/showpost.php?p=464901&postcount=2703[/URL]

Rodrigo 2019-05-07 06:32

Help! I'm trying to set up MFAKTC on a newly arrived (refurbished) GTX 960 running in an old Windows XP machine, but thus far without success.

The XP has been happily TFing on MFAKTC (CUDA 4.2) with a GeForce GT 730. Somewhere along the way I came to understand that a GTX 960 won't run on CUDA 4.2, so I downloaded the CUDA 6.5 version of MFAKTC, extracted it to its own directory on the XP, and tried to run it from a command prompt as usual. However, the program keeps failing with a dialog box stating that, "MFAKTC-WIN-32.EXE is not a valid Win32 application," and then a new line is output to the command line saying that, "Access is denied."

What am I doing wrong, and what do I need to do to get this working? There are a lot of balls to juggle here, and I don't know which one I'm failing to catch.

kriesel 2019-05-07 11:33

[QUOTE=Rodrigo;515991]Help! I'm trying to set up MFAKTC on a newly arrived (refurbished) GTX 960 running in an old Windows XP machine, but thus far without success.

The XP has been happily TFing on MFAKTC (CUDA 4.2) with a GeForce GT 730. Somewhere along the way I came to understand that a GTX 960 won't run on CUDA 4.2, so I downloaded the CUDA 6.5 version of MFAKTC, extracted it to its own directory on the XP, and tried to run it from a command prompt as usual. However, the program keeps failing with a dialog box stating that, "MFAKTC-WIN-32.EXE is not a valid Win32 application," and then a new line is output to the command line saying that, "Access is denied."

What am I doing wrong, and what do I need to do to get this working? There are a lot of balls to juggle here, and I don't know which one I'm failing to catch.[/QUOTE]
Per [url]https://en.wikipedia.org/wiki/CUDA[/url] the GTX960 requires CUDA 5.2, so you seem to have gotten that part right. I suggest checking what version of Windows your newly downloaded mfaktc.exe was compiled for. Also look into what NVIDIA driver version you have installed and what CUDA levels that supports. And what version dlls you have in place; should be a match to the mfaktc.exe; CUDA6.5.

Rodrigo 2019-05-07 15:48

[QUOTE=kriesel;516007]Per [URL]https://en.wikipedia.org/wiki/CUDA[/URL] the GTX960 requires CUDA 5.2, so you seem to have gotten that part right. I suggest checking what version of Windows your newly downloaded mfaktc.exe was compiled for. Also look into what NVIDIA driver version you have installed and what CUDA levels that supports. And what version dlls you have in place; should be a match to the mfaktc.exe; CUDA6.5.[/QUOTE]
OK, I have [URL="https://www.nvidia.com/Download/driverResults.aspx/105040/en-us"]this driver[/URL] installed, it's the one that the Nvidia site led me to when entering the particulars on the driver downloads page.

How does one check which version of Windows MFAKTC 0.21 was compiled for? The ZIP file contains 32- and 64-bit versions and this XP is 32 bits, so...

Regarding the other types of info you asked about, I've struck out on all of them. The [URL="http://us.download.nvidia.com/Windows/368.81/368.81-winxp-desktop-release-notes-updated.pdf"]release notes[/URL] for this driver were of no help, and I didn't find anything that looked useful in Device Manager. A Web search for "what CUDA level does 368.81 driver support" didn't turn up anything; the [URL="https://www.geforce.com/hardware/desktop-gpus/geforce-gtx-960/specifications"]specifications[/URL] page for the 960 says merely that "Yes" it supports CUDA, but not [B]what[/B] levels.
:bob:

Rodrigo 2019-05-07 16:13

According to the first post on [URL="https://stackoverflow.com/questions/30820513/what-is-the-correct-version-of-cuda-for-my-nvidia-driver#30820690"]this page[/URL], the 368.81 driver should support CUDA 8.0 as well as previous levels. The thread addresses Ubuntu, but I have to think that the concepts are equally applicable to Windows.


All times are UTC. The time now is 22:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.