Loading ...
Sorry, an error occurred while loading the content.
 

Hyperthreading slow down block Lanczos processing.

Expand Messages
  • chris2be8
    Hello, I ve tested the matrix solving step with 1 vs 2 threads on a single core CPU with hyperthreading. It runs *faster* with 1 thread than with 2. Lattice
    Message 1 of 1 , Oct 4, 2009
      Hello,

      I've tested the matrix solving step with 1 vs 2 threads on a single core CPU with hyperthreading. It runs *faster* with 1 thread than with 2.

      Lattice sieving runs faster with 2 threads though.

      Output from the tests:
      chris@linux-5hwg:~/ggnfs/tests/r432.t1> cp * ../r432.t2/

      chris@linux-5hwg:~/ggnfs/tests/r432.t1> nice -n 19 ../../bin/msieve -s r432.dat -l ggnfs.log -i r432.ini -v -nf r432.fb -t 2 -nc2


      Msieve v. 1.41
      Sat Oct 3 19:36:41 2009
      random seeds: 67a9c729 3ea4f1f8
      factoring 2309468822170900692840646651270207852193995381062355658198614318706697457274826789838337182448036951501154734411085450346420323325635103926097 (142 digits)
      searching for 15-digit factors
      commencing number field sieve (142-digit input)
      R0: -1000000000000000000000000000000000000
      R1: 1
      A0: 1
      A1: 0
      A2: -1
      A3: 0
      A4: 1
      skew 1.00, size 7.988858e-15, alpha 2.570846, combined = 3.272784e-09

      commencing linear algebra
      read 353772 cycles
      cycles contain 1190813 unique relations
      read 1190813 relations
      using 20 quadratic characters above 134216882
      building initial matrix
      memory use: 136.4 MB
      read 353772 cycles
      matrix is 353566 x 353772 (104.4 MB) with weight 30817161 (87.11/col)
      sparse part has weight 23822323 (67.34/col)
      filtering completed in 2 passes
      matrix is 351903 x 352103 (104.1 MB) with weight 30731302 (87.28/col)
      sparse part has weight 23772150 (67.51/col)
      read 352103 cycles
      matrix is 351903 x 352103 (104.1 MB) with weight 30731302 (87.28/col)
      sparse part has weight 23772150 (67.51/col)
      saving the first 48 matrix rows for later
      matrix is 351855 x 352103 (99.1 MB) with weight 24545454 (69.71/col)
      sparse part has weight 22453094 (63.77/col)
      matrix includes 64 packed rows
      using block size 43690 for processor cache size 1024 kB
      commencing Lanczos iteration (2 threads)
      memory use: 96.6 MB
      linear algebra completed 350108 of 352103 dimensions (99.4%, ETA 0h 0m)
      lanczos halted after 5565 iterations (dim = 351855)
      recovered 38 nontrivial dependencies
      BLanczosTime: 2758
      elapsed time 00:46:01

      chris@linux-5hwg:~/ggnfs/tests/r432.t1> cd ../r432.t2/

      chris@linux-5hwg:~/ggnfs/tests/r432.t2> nice -n 19 ../../bin/msieve -s r432.dat -l ggnfs.log -i r432.ini -v -nf r432.fb -nc2


      Msieve v. 1.41
      Sat Oct 3 20:23:52 2009
      random seeds: dbb86a26 2f77ad2f
      factoring 2309468822170900692840646651270207852193995381062355658198614318706697457274826789838337182448036951501154734411085450346420323325635103926097 (142 digits)
      searching for 15-digit factors
      commencing number field sieve (142-digit input)
      R0: -1000000000000000000000000000000000000
      R1: 1
      A0: 1
      A1: 0
      A2: -1
      A3: 0
      A4: 1
      skew 1.00, size 7.988858e-15, alpha 2.570846, combined = 3.272784e-09

      commencing linear algebra
      read 353772 cycles
      cycles contain 1190813 unique relations
      read 1190813 relations
      using 20 quadratic characters above 134216882
      building initial matrix
      memory use: 136.4 MB
      read 353772 cycles
      matrix is 353566 x 353772 (104.4 MB) with weight 30817161 (87.11/col)
      sparse part has weight 23822323 (67.34/col)
      filtering completed in 2 passes
      matrix is 351903 x 352103 (104.1 MB) with weight 30731302 (87.28/col)
      sparse part has weight 23772150 (67.51/col)
      read 352103 cycles
      matrix is 351903 x 352103 (104.1 MB) with weight 30731302 (87.28/col)
      sparse part has weight 23772150 (67.51/col)
      saving the first 48 matrix rows for later
      matrix is 351855 x 352103 (99.1 MB) with weight 24545454 (69.71/col)
      sparse part has weight 22453094 (63.77/col)
      matrix includes 64 packed rows
      using block size 43690 for processor cache size 1024 kB
      commencing Lanczos iteration
      memory use: 93.9 MB
      linear algebra completed 350046 of 352103 dimensions (99.4%, ETA 0h 0m)
      lanczos halted after 5566 iterations (dim = 351855)
      recovered 38 nontrivial dependencies
      BLanczosTime: 2021
      elapsed time 00:33:44

      It was only a rather small test case though.

      I don't know how many threads would be best for a system with more that 1 core and hyperthreading. I would try as many threads as cores first.

      Chris K
    Your message has been successfully submitted and would be delivered to recipients shortly.