mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GMP-ECM (https://www.mersenneforum.org/forumdisplay.php?f=55)
-   -   ECM for CUDA GPUs in latest GMP-ECM ? (https://www.mersenneforum.org/showthread.php?t=16480)

wombatman 2014-06-06 17:16

1 Attachment(s)
ChristianB, if you'd like to try things out, here's a 64-bit version compiled with CC 2.0 and MPIR 2.7.0. If you want different compilation parameters, let me know and I'll try to help out.

Included in the zip is a test file that I was given a while ago--to make sure everything works run:

[CODE]./test.gpuecm ecm_gpu.exe[/CODE]

It should pass the 3 or so tests in the file (did on my computer under MinGW-64).

ChristianB 2014-06-06 18:42

Thanks wombatman,
I just read that ecm-cuda needs a compute capability of at least 2.0 for which I have to switch my GPU again. If I get ecm to build a binary on my Debian I will switch the cards and try it locally. I also have to adjust our BOINC-wrapper in order to deal with the extra options.
Thanks to the explanations by Chris I' m currently setting up the nvidia build environment, which looks promising.

RichD 2014-06-06 23:39

Just an off topic thought.

Perhaps it would be easier to BOINCify a simple GPU project such as one of the mfaktX apps. The learning experience acquired could be used for bigger and more complex projects. :smile:

ChristianB 2014-06-07 00:28

Doing a real BOINCification is hard you're right. But using the wrapper is easier. The problem is that the stock BOINC wrapper needs some modifications for ecm (like accepting non-zero success exit codes) and also needs some modifications to support legacy GPU apps. Checkpointing with ecm is also difficult from a BOINC point of view.

I investigated a little further into the ecm source code and found out that even for the gpu-ecm with wrapper solution I need to modify the ecm code (ecm has to terminate by itself after stage 1).

I also took a look into mfaktc code and it seems that this could be easily BOINCified but I have to build a whole new pipeline on the server to support this new subproject but we already have the ecm pipeline that just needs to be modified. Also ecm is used for a variety of subprojects mfaktc only for one. So I will think more about ecm code changes than mfaktc for the moment.

wombatman 2014-06-07 00:37

I don't know who programmed it, but there's the ecmclient server programs that do individual curves (up to a few tens) for various numbers. Maybe something like that would work?

Brian Gladman 2014-06-09 20:35

[QUOTE=wombatman;375193]If somebody can help me figure out why I get the following errors, I can provide one:

[CODE]Error 202 error LNK2001: unresolved external symbol __gmpn_mul_fft

Error 204 error LNK2001: unresolved external symbol __gmpn_fft_best_k[/CODE]

libecm_gpu.lib builds without any issue.[/QUOTE]

This is most likely caused because you are building GMP-ECM out of its repository but you are trying to link to an older version of MPIR.

To build GMP-ECM from its repository you need to link with the repository version of MPIR because I keep the two repositories in sync.

The incompatibility arises because the _internal_ FFT interface in MPIR (which GMP-ECM actually uses) has changed with Bill Hart's faster FFT implementation.

wombatman 2014-06-09 20:52

I think you are correct. I updated the MPIR library (mpir.lib) and the accompanying files (.pdb) and it compiled without issue.

wombatman 2014-06-11 18:25

Quick question about the iteration counter:

When I run with B1=43M, the 1st iteration printout that shows up is [CODE]60000000 iterations to go[/CODE]

Is the count just off?

wombatman 2014-06-12 17:30

I've been continuing to play with expanding the GMP-ECM GPU to higher than 1018 bits. Can someone help out by pointing me to a number larger than, say, 350 digits that has a small factor that would be found in stage 1 of ECM?

lorgix 2014-06-12 17:37

[QUOTE=wombatman;375664]I've been continuing to play with expanding the GMP-ECM GPU to higher than 1018 bits. Can someone help out by pointing me to a number larger than, say, 350 digits that has a small factor that would be found in stage 1 of ECM?[/QUOTE]
(2^1327+1)/3

wombatman 2014-06-12 18:01

1 Attachment(s)
Ok. I'm not sure what to make of this. Using the test.gpuecm file, the compiled GMP-ECM passes both of the stage 1 factor checks but fails the "stage 2 on CPU" check. However, it passes the check from earlier in this thread on resume, so the stage 2 part would seem to work fine.

In addition, if I save the stage 1 curves for (2^1327-1)/3 and then do "-resume", it finds the small factor fine but it won't find it in Stage 1, even with the sigma given.

In short, I'm going to go ahead and provide what I'm compiled for everyone to test out and see if it's really working like it seems to be. The test.gpuecm file and xaa.txt file are also included. This exe is 64-bit, compiled with MPIR 2.7.0 with VS 2012. It takes numbers greater than (2^1018-1) without issue.

To check the xaa.txt file, run:
[CODE]ecm_gpu.exe -v -one -resume xaa.txt 3e6 5706890290[/CODE]

It should find the factor on the 2nd curve.


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

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