Indeed the p6/mmx uses the default values for those missing tuning
values, which are in gmp-impl.h, for example MUL_TOOM4_THRESHOLD is
set to 400, which is reasonable.

It's curious that the FFT still triggers the assert with the last 6
lines replaced with the original ones that we provided.

Thanks for reporting that. If you find the time, it might be helpful
to us to post the entire contents of the relevant gmp-mparam.h file on
the list for us, so we can see if we can get it to fault on another
similar machine we have access to. It definitely shouldn't fault with
the FFT values set as we have them, so we would consider that a bug.

Also check that the link to gmp-mparam.h from the top level directory
is actually pointing to the gmp-mparam.h file that you think it is.
Simply open it and check that the contents are as per the version in
the mpn/x86/p6/mmx directory as you expect. I think that seems to be
the case, because your benchmark got further the second time around,
which indicates that indeed the right file is being changed. But
always good to be sure.

Bill.

2010/1/10 Gianrico Fini <gianrico.f...@gmail.com>:
> Ok, I'm trying this too: selectively taking some output (all except
> last 6 lines FFT_MUL and SQR_MUL) of make tune, and copy it into gmp-
> mparar.h (to try to work around code instability that simply tuning
> triggers)...
>
> --MPIR-1.3.0-rc4--
> $ mpir_bench_two/bench_two
>
> Running MPIR benchmark
> GenuineIntel Family 6 Model 9 Stepping 5
> Intel(R) Pentium(R) M processor 1400MHz
> Speed: 1.40 GHz (reported)
>  Category base
>  Program multiply (weight 1.00)
>         128         0 =>  7657626
>         512         0 =>   813434
>        8192         0 =>    12048
>      131072         0 =>      269
>     2097152         0 =>     10.7
>         128         0 =>  7683516
>         512         0 =>   813577
>        8192         0 =>     9003
>      131072         0 =>      190
>     2097152         0 =>     7.50
>       15000         0 =>     4439
>       20000         0 =>     3429
>       30000         0 =>     2045
>    16777216         0 =>     23.2
>    16777216         0 =>     1.40 =>  3041, 2172
>  Program divide (weight 1.00)
>        8192         0 =>   216805
>        8192         0 =>    84927
>        8192         0 =>    55052
>        8192         0 =>    14760
>      131072         0 =>      181
>     8388608         0 =>    0.645
>        8192         0 =>  1135490
>    16777216         0 =>    0.384 =>  2292, 1637
>  Program gcd (weight 0.50)
>         128         0 =>   332695
>         512         0 =>    44950
>        8192         0 =>     1115
>      131072         0 =>     12.6
>     1048576         0 =>    0.655 =>   673,  481
>  Program gcdext (weight 0.50)
>         128         0 =>   207595
>         512         0 =>    33814
>        8192         0 =>      482
>      131072         0 =>     7.34
>     1048576         0 =>    0.412 =>   400,  286
>  Program root (weight 0.30)
>         128         0 =>   315666
>         512         0 =>   131236
>        8192         0 =>    10432
>      131072         0 =>     95.7
>     1048576         0 =>     6.44 =>  3056, 2183
>  Program fac_ui (weight 0.20)
>         128         0 =>   336366
>        1512         0 =>     4636
> mul_fft.c:2346: GNU MP assertion failed: cc == 0
>       15000         0 =>      118Aborted
>
> Unfortunately, you suggestion is not resolving the abort condition...
> I did not expect that a simple retune could give so many problems... I
> did not change parameters at random! I simply run tune/tuneup and
> paste the result in.
> The file from the distribution (mpn/x86/p6/mmx/gmp-mparam.h) is
> completely out of date (it doesn't even include a
> MUL_TOOM4_THRESHOLD)... and I can not update it... that's sad.
>
> Ok, my time is out...
>
> On 10 Gen, 19:03, Bill Hart <goodwillh...@googlemail.com> wrote:
>> Actually, if you take the tuning values that are missing at the end of
>> the tuning file and replace them with the values we supplied
>> (MUL_FFT_TABLE, SQR_FFT_TABLE, etc) you will probably find the
>> assertion goes away. The assertion was left there on purpose to
>> indicate that the FFT is most definitely using wrong tuning values and
>> giving wrong results. Only the tuning values we supplied are
>> guaranteed to not trigger it!
>>
>> Bill.
>>
>> 2010/1/10 Bill Hart <goodwillh...@googlemail.com>:
>>
>> > You'll find that all the very large stuff will be markedly worse after
>> > tuning. One of the reasons we are replacing the FFT is that at present
>> > the only people that can tune it are us, and it takes hours!
>>
>> > But thanks again for the comparisons.
>>
>> > Bill.
>>
>> > 2010/1/10 Gianrico Fini <gianrico.f...@gmail.com>:
>> >> I see the comparison is more balanced on you machine. The impressive
>> >> unbalance is in the numbers of the Mersenne and Fermat test.
>>
>> >> By the way, I tested it all again with gcc-4.4 and with the result
>> >> from (cd tune;make tune) inserted in gmp-mparam.h... for all the three
>> >> libraries.
>>
>> >> Results for GMP-5.0.0 did not change (more or less). Results for
>> >> GMP-4.3.2 have improved a little. MPIR-1.3.0-rc4... unfortunately
>> >> changed... see below:
>>
>> >> --GMP-4.3.2--
>> >> $ mpir_bench_two/bench_two_gmp
>>
>> >> Running MPIR benchmark
>> >> GenuineIntel Family 6 Model 9 Stepping 5
>> >> Intel(R) Pentium(R) M processor 1400MHz
>> >> Speed: 1.40 GHz (reported)
>> >>  Category base
>> >>  Program multiply (weight 1.00)
>> >>         128         0 =>  8679016
>> >>         512         0 =>  1474201
>> >>        8192         0 =>    15863
>> >>      131072         0 =>      276
>> >>     2097152         0 =>     11.8
>> >>         128         0 =>  7055718
>> >>         512         0 =>   942638
>> >>        8192         0 =>    10977
>> >>      131072         0 =>      195
>> >>     2097152         0 =>     8.05
>> >>       15000         0 =>     5182
>> >>       20000         0 =>     3953
>> >>       30000         0 =>     2372
>> >>    16777216         0 =>     27.5
>> >>    16777216         0 =>     1.46 =>  3505, 2504
>> >>  Program divide (weight 1.00)
>> >>        8192         0 =>   210230
>> >>        8192         0 =>   169191
>> >>        8192         0 =>    51893
>> >>        8192         0 =>    14614
>> >>      131072         0 =>      202
>> >>     8388608         0 =>    0.677
>> >>        8192         0 =>   223045
>> >>    16777216         0 =>    0.426 =>  2080, 1486
>> >>  Program gcd (weight 0.50)
>> >>         128         0 =>   405431
>> >>         512         0 =>    62607
>> >>        8192         0 =>     1151
>> >>      131072         0 =>     14.5
>> >>     1048576         0 =>    0.701 =>   785,  560
>> >>  Program gcdext (weight 0.50)
>> >>         128         0 =>   269312
>> >>         512         0 =>    40694
>> >>        8192         0 =>      585
>> >>      131072         0 =>     8.23
>> >>     1048576         0 =>    0.436 =>   470,  336
>> >>  Program root (weight 0.30)
>> >>         128         0 =>   252938
>> >>         512         0 =>   171558
>> >>        8192         0 =>    24178
>> >>      131072         0 =>      305
>> >>     1048576         0 =>     16.1 =>  5525, 3946
>> >>  Program fac_ui (weight 0.20)
>> >>         128         0 =>   409654
>> >>        1512         0 =>     5605
>> >>       15000         0 =>     98.7
>> >>     1000010         0 =>    0.283
>> >>     2123456         0 =>    0.106 =>  92.6, 66.2 =>  1546, 1104
>> >>  Category app
>> >>  Program rsa (weight 1.00)
>> >>                   512 =>     2478
>> >>                  1024 =>      413
>> >>                  2048 =>     61.6 =>   398,  284
>> >>  Program pi (weight 1.00)
>> >>                 10000 =>      104
>> >>                100000 =>     3.90
>> >>               1000000 =>    0.218 =>  4.46, 3.18
>> >>  Program bpsw (weight 1.00)
>> >>                  1024 =>     74.5
>> >>                  4096 =>     2.34
>> >>                 16384 =>   0.0706 =>  2.31, 1.65
>> >>  Program wagstaff (weight 1.00)
>> >>                  1024 =>      327
>> >>                  4096 =>     10.9
>> >>                 16384 =>    0.342 =>  10.7, 7.62
>> >>  Program mersenne (weight 1.00)
>> >>                  3217 =>     4.30
>> >>                  4253 =>     2.15
>> >>                  4423 =>     1.94
>> >>                  9689 =>    0.249
>> >>                 11213 =>    0.182 => 0.959,0.685
>> >>  Program fermat (weight 1.00)
>> >>                     8 =>     1657
>> >>                    10 =>     83.6
>> >>                    12 =>     2.52 =>  70.4, 50.3 =>  12.0, 8.56 =>
>> >> 136, 97.2
>>
>> >> --MPIR-1.3.0-rc4--
>> >> $ mpir_bench_two/bench_two
>>
>> >> Running MPIR benchmark
>> >> GenuineIntel Family 6 Model 9 Stepping 5
>> >> Intel(R) Pentium(R) M processor 1400MHz
>> >> Speed: 1.40 GHz (reported)
>> >>  Category base
>> >>  Program multiply (weight 1.00)
>> >>         128         0 =>  7648002
>> >>         512         0 =>   810865
>> >>        8192         0 =>    12089
>> >>      131072         0 =>      285
>> >>     2097152         0 =>     10.9
>> >>         128         0 =>  7683516
>> >>         512         0 =>   813577
>> >>        8192         0 =>     9003
>> >>      131072         0 =>      200
>> >>     2097152         0 =>     7.52
>> >>       15000         0 =>     4441
>> >>       20000         0 =>     3452
>> >>       30000         0 =>     2045
>> >>    16777216         0 =>     23.2
>> >>    16777216         0 =>     1.44 =>  3073, 2195
>> >>  Program divide (weight 1.00)
>> >>        8192         0 =>   217532
>> >>        8192         0 =>    85041
>> >>        8192         0 =>    54990
>> >>        8192         0 =>    14711
>> >>      131072         0 =>      181
>> >>     8388608         0 =>    0.645
>> >>        8192         0 =>  1111505
>> >>    16777216         0 =>    0.384 =>  2286, 1633
>> >>  Program gcd (weight 0.50)
>> >>         128         0 =>   331517
>> >>         512         0 =>    44950
>> >>        8192         0 =>     1114
>> >>      131072         0 =>     12.6
>> >>     1048576         0 =>    0.649 =>   671,  479
>> >>  Program gcdext (weight 0.50)
>> >>         128         0 =>   206896
>> >>         512         0 =>    34492
>> >>        8192         0 =>      490
>> >>      131072         0 =>     7.41
>> >>     1048576         0 =>    0.414 =>   404,  288
>> >>  Program root (weight 0.30)
>> >>         128         0 =>   320216
>> >>         512         0 =>   130654
>> >>        8192         0 =>    10332
>> >>      131072         0 =>     94.8
>> >>     1048576         0 =>     6.29 =>  3035, 2168
>> >>  Program fac_ui (weight 0.20)
>> >>         128         0 =>   326635
>> >>        1512         0 =>     4571
>> >> mul_fft.c:2346: GNU MP assertion failed: cc == 0
>> >>       15000         0 =>      119Aborted
>>
>> >> ...Yes, it started with some slightly better result (I see that tuning
>> >> is useful for multiplication), then aborted. Changing tuned values
>> >> give instability? Is it a problem with the new compiler? I do not
>> >> know...
>> >> GMP5 seems more stable and supporting my platform, I'll start using
>> >> it.
>> >> Thanks for all the informations and keep up the nice work.
>>
>> >> Gian.
>>
>> >> On 10 Gen, 18:20, Bill Hart <goodwillh...@googlemail.com> wrote:
>> >>> Sure, it's interesting to compare.
>>
>> >>> On my 64 bit machine (Selmer):
>>
>> >>> K10-2:
>>
>> >>> Squaring:          MPIR 1.3.0 GMP 5.0.0
>> >>> =======         ========  ========
>> >>> 128 x 128 :          56715728   55997671
>> >>> 512 x 512 :          11350749   13487276
>> >>> 8192 x 8192 :          149696      151687
>> >>> 131072 x 131072 :       2512         2640
>> >>> 2097152 x 2097152 :    94.2          81.6
>>
>> >>> Multiplication:
>> >>> ==========
>> >>> 128 x 128 :           57689204  56006766
>> >>> 512 x 512 :           11350738  10179077
>> >>> 8192 x 8192 :           104945     101532
>> >>> 131072 x 131072 :       1856         1848
>> >>> 2097152 x 2097152 :     65.7         54.8
>>
>> >>> Unbalanced:
>> >>> ==========
>> >>> 15000 x 10000 :          51197      51819
>> >>> 20000 x 10000 :          40086      38484
>> >>> 30000 x 10000 :          23539      24674
>> >>> 16777216 x 512 :            392         456
>> >>> 16777216 x 262144 :      10.7        12.9
>>
>> >>> Division :
>> >>> =========
>> >>> 8192 / 32 :               1420564  1318523
>> >>> 8192 / 64 :               1155167  1334473
>> >>> 8192 / 128 :               624077    805567
>> >>> 8192 / 4096 :             171758    249209
>> >>> 8192 / 8064 :            7084081 8455199
>> >>> 131072 / 65536 :            1992      2588
>> >>> 8388608 / 4194304 :       5.86       11.5
>> >>> 16777216 / 262144 :       4.03       6.94
>>
>> >>> GCD :
>> >>> ====
>> >>> 128 x 128 :               1820216 1971827
>> >>> 512 x 512 :                 168623  221378
>> >>> 8192 x 8192 :                 5560      6321
>> >>> 131072 x 131072 :            115       121
>> >>> 1048576 x 1048576 :       5.93      6.27
>>
>> >>> XGCD :
>> >>> =====
>> >>> 128 x 128 :                 682582  884318
>> >>> 512 x 512 :                 122152  154781
>> >>> 8192 x 8192 :                 3826     4339
>>
>> ...
>>
>> leggi tutto
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mpir-devel" group.
> To post to this group, send email to mpir-de...@googlegroups.com.
> To unsubscribe from this group, send email to 
> mpir-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/mpir-devel?hl=en.
>
>
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.


Reply via email to