mersenneforum.org Faster GPU-ECM with CGBN
 Register FAQ Search Today's Posts Mark Forums Read

2022-03-06, 16:37   #111
chris2be8

Sep 2009

26×37 Posts

Quote:
 Originally Posted by EdH I am confused (yet, again). How do I start from scratch to compile GMP-ECM with CGBN for an sm_35 card?
I would try:
mkdir ecm-gpu # Change dir name if you want
cd ecm-gpu
git clone https://gitlab.inria.fr/zimmerma/ecm.git
cd ecm
autoreconf -si
./configure --enable-gpu=35 -with-cgbn-include=/home/chris/ecm-seth/CGBN/include/cgbn # Update path to CGBN as appropriate
make

But I can't test it because I don't have a sm_35 GPU.

 2022-03-06, 18:54 #112 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 126216 Posts I guess my problem is getting CGBN. I'd already done the rest, but when I tried to get CGBN I got a "forbidden" message. I thought the post from Gimarel meant that CGBN was included with GMP-ECM at that location. I'll study the thread further. . .
 2022-03-06, 19:26 #113 SethTro     "Seth" Apr 2019 43710 Posts "Getting" CGBN should be git clone https://github.com/NVlabs/CGBN.git which will create a new directory "CGBN" then the commands chris2be8 wrote (thanks) should work. I got access to contribute back to gmp-ecm so I will work on adding support for sm_86. @chris2be8. I think you have an old version of the code. That limit was removed at some point. Can you check that you are using https://gitlab.inria.fr/zimmerma/ecm.git and not my personal repository (https://github.com/sethtroisi/gmp-ecm).
2022-03-06, 19:47   #114
EdH

"Ed Hall"
Dec 2009

470610 Posts

Quote:
 Originally Posted by SethTro "Getting" CGBN should be git clone https://github.com/NVlabs/CGBN.git which will create a new directory "CGBN" then the commands chris2be8 wrote (thanks) should work. I got access to contribute back to gmp-ecm so I will work on adding support for sm_86. @chris2be8. I think you have an old version of the code. That limit was removed at some point. Can you check that you are using https://gitlab.inria.fr/zimmerma/ecm.git and not my personal repository (https://github.com/sethtroisi/gmp-ecm).
OK, Thanks! I think I'm getting somewhere. I found CGBN, but had trouble with googletest when unzip crashed with mismatched internal names. (Maybe I have an old CGBN?) I think I've worked around that now and am trying to compile CGBN, but it looks like it's stuck.

I think I'm where I can work it a little further. I'll get back in a bit.

 2022-03-06, 20:09 #115 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 111428 Posts Well, this isn't making any sense to me: Code: configure: Using CGBN from /home/math55/Math/CGBN/include/cgbn checking if CGBN is present... no configure: error: cgbn.h not found (check if /cgbn needed after /include) Code: $ls /home/math55/Math/CGBN/include/cgbn arith cgbn.cu cgbn.h core impl_mpz.cc cgbn_cpu.h cgbn_cuda.h cgbn_mpz.h impl_cuda.cu I even copied the directory from the properties for the cgbn.h file. I also tried with and without "/cgbn."  2022-03-06, 21:03 #116 EdH "Ed Hall" Dec 2009 Adirondack Mtns 2·13·181 Posts I think I found it. (from acinclude.m4): Code:  NVCC_CHECK_COMPILE( [ #include #include ], [-I$cgbn_include \$GMPLIB], [AC_MSG_RESULT([yes])], [ AC_MSG_RESULT([no]) AC_MSG_ERROR([cgbn.h not found (check if /cgbn needed after /include)]) ] ) My ECM compile normally includes --with-gmp=/usr/local/, but I removed it for this ./configure and it finished without troubles. I'm running it now and it appears to be doing OK. Thanks for all the help.
2022-03-06, 23:51   #117
SethTro

"Seth"
Apr 2019

43710 Posts

Quote:
 Originally Posted by EdH OK, Thanks! I think I'm getting somewhere. I found CGBN, but had trouble with googletest when unzip crashed with mismatched internal names. (Maybe I have an old CGBN?) I think I've worked around that now and am trying to compile CGBN, but it looks like it's stuck. I think I'm where I can work it a little further. I'll get back in a bit.

IFAIK you don't need to compile CGBN (or setup the googletest), you just need the folder downloaded ("cloned") from Github.

2022-03-07, 00:34   #118
EdH

"Ed Hall"
Dec 2009

2·13·181 Posts

Quote:
 Originally Posted by SethTro IFAIK you don't need to compile CGBN (or setup the googletest), you just need the folder downloaded ("cloned") from Github.
ATM, I have it running, but now that I've had success, I may backtrack to see if that is the case. Sorry if I've been too ignorant of all these workings, but I hope I'm learning something.

Thanks for all the help!

2022-03-07, 00:49   #119
EdH

"Ed Hall"
Dec 2009

2×13×181 Posts

Quote:
 Originally Posted by SethTro IFAIK you don't need to compile CGBN (or setup the googletest), you just need the folder downloaded ("cloned") from Github.
I restarted from scratch and now that I'm familiar with it, all went quick and easy.

2022-03-07, 01:07   #120
RichD

Sep 2008
Kansas

3·1,213 Posts

Quote:
 Originally Posted by EdH I restarted from scratch and now that I'm familiar with it, all went quick and easy.
Oh good, does that mean we might see a new "How I ... " thread?

2022-03-07, 03:19   #121
EdH

"Ed Hall"
Dec 2009

2·13·181 Posts

Quote:
 Originally Posted by RichD Oh good, does that mean we might see a new "How I ... " thread?
I wasn't considering one, since it really boils down to only a couple lines of install. Or, maybe you mean a GMP-ECM with GPU thread from start to finish? I do wonder if I should try to add CGBN to the Colab GMP-ECM session.

 Similar Threads Thread Thread Starter Forum Replies Last Post moytrage Software 50 2021-07-21 05:55 indomit Information & Answers 4 2020-10-07 10:50 paulunderwood Miscellaneous Math 13 2016-08-02 00:05 lidocorc Software 2 2008-11-08 09:26 clowns789 Miscellaneous Math 3 2004-05-27 23:39

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

Fri Aug 12 23:33:17 UTC 2022 up 36 days, 18:20, 2 users, load averages: 1.49, 1.27, 1.18