tuneup: speed_measure() could not get 4 results within 1.0%

Nikita Zlobin nick87720z at gmail.com
Thu Mar 15 15:34:10 UTC 2018

There is issue with tune system. I tried to compile from sources and
tune on two laptops, one with intel b950, seconf - i5 (don't remember
exact cpu number), both sandybridge (i5 - with avx).

./configure --enable-cxx
make -j1 -C tune tuneup
./tune/tuneup | tee gmp.mparam.h.new

In all cases, when i could see log, when it completes there is some
diagnostic message:
speed_measure() could not get 4 results within 1.0%

$? is usually 0, but...
$ echo ${PIPESTATUS[*]/#/+}
prints +134 +0
second test is found in gentoo gmp ebuild after tuneup; is it really
critical, or rebuilding with such result is still not bad?

Test usually completes in different point, sometimes too close, so one
need to keep all logs together to see the difference.

Last attemt is made with hg clone from 6.1.2 branch (in main branch
tuneup doesn't even build). Last log:
#define SET_STR_DC_THRESHOLD              1391

#define FAC_DSC_THRESHOLD                  557
#define FAC_ODD_THRESHOLD                   24

#define MATRIX22_STRASSEN_THRESHOLD         23
#define HGCD_THRESHOLD                   speed_measure() could not get
4 results within 1.0% unsorted         sorted
  0.000000297644    0.000000147974    is about 0.5%
  0.000029764       0.000014797
  0.000025665       0.000014848
Resulting file (gmp.mparam.h.new) doesn't have any diag messages at the
end - last line is just: #define HGCD_THRESHOLD

Previous test is done with release - before to try it, i rebooted,
stoped everything not necessary (DM, cups, NetworkManager, gpm....)

It proceeded few more lines before to fail, yet it ends with something
#define MATRIX22_STRASSEN_THRESHOLD         17
#define HGCD_THRESHOLD                     112
#define HGCD_APPR_THRESHOLD                104
#define HGCD_REDUCE_THRESHOLD             4633
#define GCD_DC_THRESHOLD                   492
#define GCDEXT_DC_THRESHOLD                379
Oops, can't measure all mpn_jacobi_base methods at 48

System: gentoo (from calculate distro), linux 4.14.19, gcc-6.4.0,
binutils-2.19.1, glibc-2.25.

$ cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 2.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 2.10 GHz.
                  The governor "performance" may decide which speed to
use within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.08 GHz (asserted by call to kernel)
  boost state support:
    Supported: no
    Active: no
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores

Some fields from /proc/cpuinfo:
cpu family      : 6
model           : 42
model name      : Intel(R) Pentium(R) CPU B950 @ 2.10GHz
stepping        : 7
microcode       : 0x25
cpu MHz         : 2023.712
cache size      : 2048 KB
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual

More information about the gmp-bugs mailing list