![]() |
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 [/code]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 [/code] Then run [c]make all[/c] 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 [/code]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 |
| All times are UTC. The time now is 01:09. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.