mersenneforum.org  

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

Reply
 
Thread Tools
Old 2020-12-29, 16:45   #507
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3×7×263 Posts
Default

Just to brag a bit: I actually had a successful factoring session with Colab using the GPU branch of GMP-ECM for stage 1 and a local machine for stage 2.

It was only a 146 digit number and it took quite a while, but still, it worked!

Colab connected me to a T4 which gave me 2560 cores on which I ran stage 1, with the -save option. The local machine "watched" for the residue file, using the tunneling setup by chalsall, described elsewhere. The local machine used ecm.py by WraithX to run stage 2.

A minor session, but it proved the concept.
EdH is offline   Reply With Quote
Old 2022-03-06, 14:52   #508
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3·7·263 Posts
Default

GMP-ECM has the option -one to tell ECM to stop after the first factor is found. But, when running a GPU, stage 2 is performed on all the residues from stage 1, instead of stopping when a factor is found. Since GMP-ECM seems to still be single* threaded, with lots of cores, it takes a lot longer than it needs to. I can use external separate programs, such as ecm.py, but my scripts would be even more complicated.

Any help?

*I had thought at some point, that GMP-ECM introduced multi-threading, but I can't find anything about it. Memory fluctuations?
EdH is offline   Reply With Quote
Old 2022-03-07, 12:23   #509
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

7·223 Posts
Default

For P-1 stage 2, GMP-ECM can be configured to use OpenMP. Everything else is single threaded.
kruoli is online now   Reply With Quote
Old 2022-03-07, 14:10   #510
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

552310 Posts
Default

Quote:
Originally Posted by kruoli View Post
For P-1 stage 2, GMP-ECM can be configured to use OpenMP. Everything else is single threaded.
Thanks Oliver! Maybe that's what I had seen and my memory is a bit foggy.
EdH is offline   Reply With Quote
Old 2022-03-07, 18:01   #511
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

17×29 Posts
Default

There's also some code under multiecm.c in gmp-ecm. I've never used it (I prefer Wraith's ecm.py), the header is

Code:
/* multiecm.c - ECM with many curves with many torsion and/or in parallel 
   Author: F. Moraino
*/
But it doesn't look like it's been worked on in 9 years.
SethTro is offline   Reply With Quote
Old 2022-03-07, 18:40   #512
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3×7×263 Posts
Default

Quote:
Originally Posted by SethTro View Post
There's also some code under multiecm.c in gmp-ecm. I've never used it (I prefer Wraith's ecm.py), the header is

Code:
/* multiecm.c - ECM with many curves with many torsion and/or in parallel 
   Author: F. Moraino
*/
But it doesn't look like it's been worked on in 9 years.
Thanks! I also use ecm.py for stage 2 external work, but it gets pretty complicated in my scripts.
EdH is offline   Reply With Quote
Old 2022-03-08, 16:47   #513
chris2be8
 
chris2be8's Avatar
 
Sep 2009

245410 Posts
Default

Quote:
Originally Posted by EdH View Post
*I had thought at some point, that GMP-ECM introduced multi-threading, but I can't find anything about it. Memory fluctuations?
From NEWS:
Quote:
Changes between GMP-ECM 6.4.4 and GMP-ECM 7.0:
* GMP-ECM is now thread-safe. In particular the "ecmfactor" binary can be
called with say -t 17 to use 17 threads.
I think I looked at it once but didn't find it useful. I don't think it can be used for doing stage 2 after a GPU has done stage 1.
chris2be8 is offline   Reply With Quote
Old 2022-03-08, 17:14   #514
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3×7×263 Posts
Default

That seems familiar! I'm sure that's what I was thinking of. Thanks for finding it!

My next issue is what you reference. I'm currently sending residues to a second machine while tasking the GPU machine with the next level of B1. But, if stage 2 is successful on the second machine, I still need to wait for the GPU to finish its current B1. I've tried pkill ecm, but it doesn't seem to do anything at the call.
EdH is offline   Reply With Quote
Old 2022-03-08, 17:33   #515
Gimarel
 
Apr 2010

1000001102 Posts
Default

Quote:
Originally Posted by EdH View Post
I've tried pkill ecm, but it doesn't seem to do anything at the call.
Try pkill -1 ecm.
Gimarel is offline   Reply With Quote
Old 2022-03-08, 18:31   #516
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

552310 Posts
Default

Quote:
Originally Posted by Gimarel View Post
Try pkill -1 ecm.
I believe that is working. Thanks!
EdH is offline   Reply With Quote
Old 2022-03-17, 08:42   #517
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

17×29 Posts
Default

Quote:
Originally Posted by EdH View Post
GMP-ECM has the option -one to tell ECM to stop after the first factor is found. But, when running a GPU, stage 2 is performed on all the residues from stage 1, instead of stopping when a factor is found. Since GMP-ECM seems to still be single* threaded, with lots of cores, it takes a lot longer than it needs to. I can use external separate programs, such as ecm.py, but my scripts would be even more complicated.

Any help?

*I had thought at some point, that GMP-ECM introduced multi-threading, but I can't find anything about it. Memory fluctuations?
I'm happy to look at this as a bug. I vaguely remember that I wasn't sure if I should always stop or only if the cofactor is composite.
SethTro 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 12:35.


Thu Jun 8 12:35:47 UTC 2023 up 294 days, 10:04, 0 users, load averages: 1.13, 1.12, 1.00

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

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔