mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2012-01-27, 21:27   #1
Karl M Johnson
 
Karl M Johnson's Avatar
 
Mar 2010

3×137 Posts
Default ECM for CUDA GPUs in latest GMP-ECM ?

Greetings.

While working on gmp-ecm, I discovered a "gpu" folder inside latest svn.
Can somebody shed some light on it?
Is it a fully-working gmp-ecm implementation ?
Or partially gpu-accelerated ?
Any info will do!
Karl M Johnson is offline   Reply With Quote
Old 2012-01-27, 21:47   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5×2,039 Posts
Default

Quote:
Originally Posted by Karl M Johnson View Post
Greetings.

While working on gmp-ecm, I discovered a "gpu" folder inside latest svn.
Can somebody shed some light on it?
Is it a fully-working gmp-ecm implementation ?
Or partially gpu-accelerated ?
Any info will do!
I'm playing with it. Not yet found a new factor with it. Current activity is to work out what's going on and then to see whether I can contribute to the effort. So far I've found areas where I may be able to help Cyril with development.

So far, it is Stage 1 only (as one should expect) and each bit in the product of prime powers up to B1 requires a separate kernel call. It would be easy enough to make the entire sequence of elliptic curve arithmetic operations a single kernel but not obviously a good idea (think about it).

The code currently uses fixed kilobit arithmetic and so is limited to factoring integers somewhat under that size. One of the areas I may be able to help is to add flexibility in that regard. Another is improve the underlying arithmetic primitives. A third is to reduce the (presently extortionate IMO) amount of cpu time used by busy-waiting for the kernels to complete.


Paul
xilman is offline   Reply With Quote
Old 2012-01-28, 06:55   #3
Karl M Johnson
 
Karl M Johnson's Avatar
 
Mar 2010

3·137 Posts
Default

Oh, alright.
It cant substitute gmp-ecm yet.

Stage2 on GPUs is not very possible(except Teslas) because it requires a lot of RAM ?
Karl M Johnson is offline   Reply With Quote
Old 2012-02-10, 15:35   #4
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5×2,039 Posts
Default

Quote:
Originally Posted by Karl M Johnson View Post
Oh, alright.
It cant substitute gmp-ecm yet.
Actually it can. I just found my first factor with gpu-ecm
Code:
Resuming ECM residue saved by pcl@anubis.home.brnikat.com with GPU-ECM 0.1 
Input number is 27199999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 (275 digits)
Using B1=110000000-0, B2=110000000-776278396540, polynomial Dickson(30), A=112777948379516601562499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998
Step 1 took 0ms
Step 2 took 176954ms
********** Factor found in step 2: 7219650603145651593481420276356225303436099
Found probable prime factor of 43 digits: 7219650603145651593481420276356225303436099
Composite cofactor 3767495339476507669490528975999036413199084363632138583182977316467718682572689799651214383863597597569613063674073098348731470273762390945944125050829513627232967008803673015815350396060271580465332444072090424114938478394067646101 has 232 digits
A total of 1792 curves were run at B1=110M and the factor found on the 1349th second stage. I'm running the remainder in case another factor can be found.

Each stage one took 70 seconds on a GTX-460. The latest ECM takes 679 seconds per stage 1 on a single core of a 1090T clocked at 3264MHz, so the GPU version is close to 10 times faster in this situation.

Paul

Last fiddled with by xilman on 2012-02-10 at 16:09
xilman is offline   Reply With Quote
Old 2012-02-10, 15:46   #5
Brain
 
Brain's Avatar
 
Dec 2009
Peine, Germany

331 Posts
Default GPU ECM 0.1

Could anybody provide a (link to a) (Windows 64) binary for GPU-ECM 0.1?
Brain is offline   Reply With Quote
Old 2012-02-10, 16:08   #6
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5×2,039 Posts
Default

Quote:
Originally Posted by xilman View Post
Actually it can. I just found my first factor with gpu-ecm
Surprise is no longer adequate, and I'm forced to resort to astonishment
Code:
Using B1=110000000-0, B2=110000000-776278396540, polynomial Dickson(30), A=113233923912048339843749999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998
Step 1 took 0ms
Step 2 took 176408ms
********** Factor found in step 2: 2315784840580190375316972295830305082761
Found probable prime factor of 40 digits: 2315784840580190375316972295830305082761
Composite cofactor 11745478044145667127387304121681137574169838448099828222193156280305822325912582394902125137121744003039884215185197839759773264126893037178852537820600462333360764644042755609744438099938488940900666235577910910744169710591419476281159 has 236 digits
took another 18 curves.

If I was unlucky not to find the p43 earlier than this, given the amount of ECM work performed, I was especially unlucky not to find the p40. The candidate number, GW(10,272) had no previously known factors despite having had a complete t40 run through the ECMNET server here and clients around the world.

The cofactor is now c193 so it's worth seeing whether the remaining curves will find anything.


Paul
xilman is offline   Reply With Quote
Old 2012-02-10, 16:23   #7
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5·2,039 Posts
Default

Quote:
Originally Posted by Brain View Post
Could anybody provide a (link to a) (Windows 64) binary for GPU-ECM 0.1?
Not me.
xilman is offline   Reply With Quote
Old 2012-02-10, 16:25   #8
pinhodecarlos
 
pinhodecarlos's Avatar
 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK

477310 Posts
Default

Quote:
Originally Posted by xilman View Post
Not me.
And for linux?
pinhodecarlos is online now   Reply With Quote
Old 2012-02-10, 16:56   #9
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5×2,039 Posts
Default

Quote:
Originally Posted by pinhodecarlos View Post
And for linux?
If you have Linux you can build from the SVN sources as easily as I can.

The process really is very straightforward and you'll end up with something which doesn't carry the risk of the Linux equivalent of DLL-hell.

If you really are not lazy(*) enough to build your own, I could make available the binary I use. No guarantees that it will work, or even run, on any other Linux system. It almost certainly won't work optimally unless you have exactly the same environment as me.

Paul

* Sometimes it's much better to do some work ahead of time to remove the need to do much more work later. That's true laziness.
xilman is offline   Reply With Quote
Old 2012-02-10, 21:30   #10
Karl M Johnson
 
Karl M Johnson's Avatar
 
Mar 2010

6338 Posts
Default

Windows binary wanted
Karl M Johnson is offline   Reply With Quote
Old 2012-02-11, 00:07   #11
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

11100010000002 Posts
Default

Quote:
Originally Posted by xilman View Post
Actually it can. I just found my first factor with gpu-ecm
Code:
Resuming ECM residue saved by pcl@anubis.home.brnikat.com with GPU-ECM 0.1 
Input number is 27199999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 (275 digits)
Using B1=110000000-0, B2=110000000-776278396540, polynomial Dickson(30), A=112777948379516601562499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998
Step 1 took 0ms
Step 2 took 176954ms
********** Factor found in step 2: 7219650603145651593481420276356225303436099
Found probable prime factor of 43 digits: 7219650603145651593481420276356225303436099
Composite cofactor 3767495339476507669490528975999036413199084363632138583182977316467718682572689799651214383863597597569613063674073098348731470273762390945944125050829513627232967008803673015815350396060271580465332444072090424114938478394067646101 has 232 digits
A total of 1792 curves were run at B1=110M and the factor found on the 1349th second stage. I'm running the remainder in case another factor can be found.

Each stage one took 70 seconds on a GTX-460. The latest ECM takes 679 seconds per stage 1 on a single core of a 1090T clocked at 3264MHz, so the GPU version is close to 10 times faster in this situation.

Paul
Awesome.

Is the code specific to a particular GPU? How portable is it?
R.D. Silverman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running CUDA on non-Nvidia GPUs Rodrigo GPU Computing 3 2016-05-17 05:43
Error in GMP-ECM 6.4.3 and latest svn ATH GMP-ECM 10 2012-07-29 17:15
latest SVN 1677 ATH GMP-ECM 7 2012-01-07 18:34
Has anyone seen my latest treatise? davieddy Lounge 0 2011-01-21 19:29
Latest version? [CZ]Pegas Software 3 2002-08-23 17:05

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

Fri Nov 27 22:38:11 UTC 2020 up 78 days, 19:49, 3 users, load averages: 1.28, 1.33, 1.36

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