mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2018-10-11, 16:08   #1
chris2be8
 
chris2be8's Avatar
 
Sep 2009

23×7×43 Posts
Default Multithreaded Linear Algebra threshold

By default msieve only uses multiple threads for matrices with more than 200000 columns. I've found this causes a step in the run time to solve a matrix:

Code:
grep -e '  lanczos halted' -e BLanczosTime -e 'commencing L' f*/ggnfs.log | less
...
f600_51+3/ggnfs.log:Tue Oct  9 21:48:53 2018  commencing Lanczos iteration (4 threads)
f600_51+3/ggnfs.log:Tue Oct  9 21:49:40 2018  lanczos halted after 3203 iterations (dim = 202523)
f600_51+3/ggnfs.log:Tue Oct  9 21:49:41 2018  BLanczosTime: 60
...
f61_80+7/ggnfs.log:Wed Oct 10 01:50:19 2018  commencing Lanczos iteration
f61_80+7/ggnfs.log:Wed Oct 10 01:52:15 2018  lanczos halted after 3134 iterations (dim = 197959)
f61_80+7/ggnfs.log:Wed Oct 10 01:52:15 2018  BLanczosTime: 128
You can adjust the threshold by updating common/lanczos/lanczos.h as follows:
Code:
chris@vega:~/msieve-svn/trunk> diff common/lanczos/lanczos.h ~/msieve-svn.old/trunk/common/lanczos/lanczos.h
98c98
< #define MIN_NROWS_TO_THREAD 100000
---
> #define MIN_NROWS_TO_THREAD 200000
Then run make all with the same parameters used to compile msieve previously.

On the same system after the change:
Code:
f791_47+6/ggnfs.log:Thu Oct 11 15:24:58 2018  commencing Lanczos iteration (4 threads)
f791_47+6/ggnfs.log:Thu Oct 11 15:25:39 2018  lanczos halted after 2973 iterations (dim = 187904)
f791_47+6/ggnfs.log:Thu Oct 11 15:25:39 2018  BLanczosTime: 51
So I'm saving 1-2 minutes per number with a matrix in this range. The crossover is smaller than 100000 but I've not had time to find out exactly where.

That system has 4 real cores, no hyperthreading. On another system where msieve is running on 1 core and it's hyprethreaded partner there's no step in run times.

Note it's only worth doing if you are factoring a lot of numbers with a matrix in this size range. And you do need to check if it will help on the system you are using.

Chris
chris2be8 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
linear algebra and threshold phenomena jasonp Factoring 2 2009-12-16 04:22
Linear algebra at 600% CRGreathouse Msieve 8 2009-08-05 07:25
Linear algebra crashes 10metreh Msieve 3 2009-02-02 08:34
Linear algebra proof Damian Math 8 2007-02-12 22:25
Linear algebra in MPQS R1zZ1 Factoring 2 2007-02-02 06:45

All times are UTC. The time now is 02:14.


Sun Dec 4 02:14:41 UTC 2022 up 107 days, 23:43, 0 users, load averages: 0.71, 0.85, 0.81

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

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