mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   The P-1 factoring CUDA program (https://www.mersenneforum.org/showthread.php?t=17835)

kriesel 2018-08-30 05:41

[QUOTE=James Heinrich;494895]Wow, sounds like you live in the backwoods of Elbonia. Or Canada.[/QUOTE]
About ten miles from the state capitol building and a billion dollar plus annual funded research land grant university. But there are lakes in the way.

Xyzzy 2018-08-30 16:12

We would give our left testicle for decent Internet connectivity.

:mike:

chalsall 2018-08-30 18:20

[QUOTE=Xyzzy;494946]We would give our left testicle for decent Internet connectivity.[/QUOTE]

I would give my right testicle for a good library.

henryzz 2018-09-02 21:40

[QUOTE=kriesel;494883]Thanks for the tip. The earliest version available there is VS 2013. (I'd hoped to be able to get back to VS2010.)

After multiple failed download attempts via my crappy slow costly ISP (768k/128k DSL, 4.8GB 14 hour download projected if things were working well, actual 1.5GB max per attempt, multiple days elapsed), the utility contractor working in my neighborhood to install fiber put an end to it by cutting the neighborhood's telco voice/DSL cable. Driving to another location got the 4.8GB ISO download on the first try in under 3 hours. With such slow and unreliable internet, I tend to go for a full install image that can be put on a local file server, download once, and reuse locally. Crappy-slow-costly-ISP was immediately contacted within 10 minutes of the start of the outage, took an hour of phone time to generate a trouble ticket, and projected beginning to repair after a week of no service, and claimed they would process a bill credit. Service cut was on the first day of the billing cycle. I've already received a bill for a full month's service not received or receivable, beginning the day the cable was cut, and the bill did not include the promised credit for outage. The DSL in this neighborhood runs from the nearest village, miles away, preventing high speed, instead of running from the nearest hut, a half mile away, that could probably provide 25.Mbps.[/QUOTE]

The earliest community edition was 2013. It was called the express edition before then. 2010 express is downloadable via that link.

kriesel 2018-10-20 02:16

[QUOTE=James Heinrich;494889]I've had ISP troubles like that in the past (it once took an ISP 6 weeks of no internet before they fixed whatever was broken), so I can sympathize. I'm happy to be on 250Mbps service now (4.8GB ISO should complete in under 3 mins). I hope your fiber install is completed soon.[/QUOTE]
Unfortunately, the Oct deadline has passed without a sufficient number of neighbors signing up, so the schedule for fiber install for my neighborhood has been delayed by nominally 6 months, to next June. And the rate of signup (I'm tracking via their website) looks ominously slow for even that delayed schedule. If/when it happens, they're offering 300, 400, and 1000Mbps.

James Heinrich 2018-10-20 02:28

[QUOTE=kriesel;498319]If/when it happens, they're offering 300, 400, and 1000Mbps.[/QUOTE]If I went with fibre in my "village" of 0.4M population, I can get fibre "to my neighbourhood" and get up to 100/10 service for $80/mo. If I lived in the 5.0M population city up the road, the exact same price (with the same company) will get me 1000/750 service (and an extra $10/mo makes is 1500/940). Yay for small(ish) towns. :ick:

kriesel 2018-10-20 06:25

[QUOTE=James Heinrich;498320]If I went with fibre in my "village" of 0.4M population, I can get fibre "to my neighbourhood" and get up to 100/10 service for $80/mo. If I lived in the 5.0M population city up the road, the exact same price (with the same company) will get me 1000/750 service (and an extra $10/mo makes is 1500/940). Yay for small(ish) towns. :ick:[/QUOTE]
If/when it comes, 300/300 is $40/mo here, plus $7.95 for modem rent, less than I'm paying for slow slow DSL when the mandatory POTS is added in along with a menu of fees and taxes. For $85/mo, a DVR and 125+ channels too. Top end is 1000/400 plus tv plus phone at $145/mo. If/when it's actually installed in my neighborhood, it's fiber to just inside the home. This is in a small 40 year old development near farm fields, nature preserve, and lake, 3 miles from a village of 10,000, and 10 miles from the state capital population ~200K, where at UW-Madison every dorm room has at least 100/100, probably gigabit since they include 802.11ac wireless. But Wisconsin overall is among the very worst states in the US for connection speed.

[url]https://www.wpr.org/wisconsin-broadband-speed-among-worst-nation[/url]
UW-Madison peers with local internet providers at up to 10G if not higher. I've met and worked with Paul N. listed at [url]https://kb.wisc.edu/ns/page.php?id=6636[/url]

aaronhaviland 2018-10-23 22:05

[QUOTE=kriesel;494317]Hi,


I stumbled on this a while back, noted it, forgot about it, and recently had another look. Has anyone compiled and run this? If so, how did it compare to the sourceforge version, which is what's mirrored at mersenne.ca?

[URL]https://github.com/ah42/cuda-p1[/URL][/QUOTE]

Oh hey, that's me! I just coincidentally just started looking in this direction again because I finally decided to get a new GPU (I'm still using the GTX 660 I got in 2012 lol. RTX 2070 should be here next week...)

I completely forgot that I had that repo...

The code I have on github should be an improvement based on the code from Sourceforge, but it's been so long, I don't remember what I actually improved.

Looking at it now, it doesn't look like SF code has been updated since I forked it in 2013. I know I've been away for a while, but is that really the most recent P-1 GPU code?

aaronhaviland 2018-10-23 23:17

[QUOTE=aaronhaviland;498613]The code I have on github should be an improvement based on the code from Sourceforge, but it's been so long, I don't remember what I actually improved.[/QUOTE]

I just found this draft of a message I had intended to send to the original authors regarding my changes.
[INDENT][INDENT]I've been playing around with the code for a few months and have come across a few bugs, added features, or tweaked things (mostly making some things more to my liking, or trying to make things work better in my specific environment).

BTW, this is PM'd and not posted publicly because I wanted to contribute, and not hijack the program. A fork is a fork, but I'm trying to be a friendly fork :)

You can browse my changes here: [url]https://github.com/ah42/cuda-p1/commits/master[/url]

My environment is 64-bit Linux, so I may have broken things for Win builds. My Makefile changes are specific to working in Ubuntu with nvidia-cuda-toolkit installed via apt-get (I've got PPAs for cuda 5.5 and 6.0)

Quick summary of some changes thus far:
- (feature) Parse Pminus1 lines in worktodo.txt
- (bug) integer overflow caused infinite loop entering stage2 with certain combinations of b1/b2
- (bug) Bypass some code if exiting with an error
- (bug) memory leaks in stage2
- (bug) estimate "tf'd-to" level based on P95 defaults, instead of using an across-the-board default value if one is not specified
- (bug) Makefile: Future proof binaries by building PTX for latest known arch.
- (bug) Set minimum B1/B2. Smaller M()'s were computing poor probability and defaulting to B1=0
- (bug) Pre-computed Dickman's values were not giving results that agreed with the probability calculator at mersenne.ca. Replaced with a function to compute at runtime.
- reduce the available amount of thread combinations to speed up benchmarking. (no impact on any of my devices: 460, 660. Excluded ranges were never chosen by any device.)
- Added quick-running tests (low b1/b2) to Makefile to verify compiled binary finds factors in stage 1 and stage 2 (make test)

A lot of other changes are just reformatting, or tweaking things for my own happiness (i.e. changing the B1/B2/e selection routines for different probabilities, sending the entire codebase through eclipse to reformat in a consistent coding style)

TODO:
- split device code from host code into separate files, providing a clean separation between the two realms. Also, makes it much easier to change the compiler/options for the host code. This sort of system was used for the setiatahome CUDA binary, and I found it provided for a very clean codebase and worked quite well.
- try to clean up some of the kernels. I'd rather do this before the above, however with all the code being in one large .cu, it makes it more difficult.
- continue tuning/adjusting the bounds-calculation algorithms. It looks like this code was just lifted from elsewhere (mprime?) and wedged into place.[/INDENT][/INDENT]

kriesel 2018-10-24 04:27

[QUOTE=aaronhaviland;498613]Oh hey, that's me! I just coincidentally just started looking in this direction again because I finally decided to get a new GPU (I'm still using the GTX 660 I got in 2012 lol. RTX 2070 should be here next week...)

I completely forgot that I had that repo...

The code I have on github should be an improvement based on the code from Sourceforge, but it's been so long, I don't remember what I actually improved.

Looking at it now, it doesn't look like SF code has been updated since I forked it in 2013. I know I've been away for a while, but is that really the most recent P-1 GPU code?[/QUOTE]Yes, your fork and sourceforge's Nov 2013 before it seem to be the most current. I've run lots of cases on the sourceforge executables and tabulated issues encountered, over the past year. See #3 of [URL]https://www.mersenneforum.org/showthread.php?t=23389[/URL] Feel free to identify any that your fork address, and tackle any.

kriesel 2018-10-24 13:42

[QUOTE=aaronhaviland;498613]
Looking at it now, it doesn't look like SF code has been updated since I forked it in 2013. I know I've been away for a while, but is that really the most recent P-1 GPU code?[/QUOTE]
Jerry (flashjh) considered including my little code edits posted with [URL]https://www.mersenneforum.org/showpost.php?p=462600&postcount=503[/URL] but as far as I know, nothing came of it. See also [URL]https://www.mersenneforum.org/showpost.php?p=463662&postcount=511[/URL], [URL]https://www.mersenneforum.org/showpost.php?p=490466&postcount=568[/URL], [URL]https://www.mersenneforum.org/showpost.php?p=494224&postcount=575[/URL]

Possibly Cubox might help in some way. [URL]https://www.mersenneforum.org/showpost.php?p=481663&postcount=552[/URL]
I'd like to figure out how to do successful CUDAPm1 Windows builds and get some out there for CUDA levels above 5.5, as well as bug fixes and enhancements, and try out how your fork compares, but am currently occupied with other things. The latest SDK is CUDA 10, so there's a lot of catching up to do.


All times are UTC. The time now is 23:19.

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