linuxinstallationcpu-speedatlas

ATLAS install: Really need to get past CPU throttle check


ATLAS 3.10.1 will not install on my organization's CentOS 6.x platform because it detects CPU throttling. In older versions of the package, there was a configure flag to turn the throttle check off (-Si cputhrchk 0) and forge ahead regardless. That option was taken out a few versions ago. I understand the reasoning behind that decision -- the developers were worried about the performance and reputation of their software and CPU throttling makes it impossible for ATLAS to tune itself. Fine. My problem is that, regardless of ATLAS performance, I just simply have to get the thing built. There are ways to halt throttling, I know, but I do not have and probably will not get permission to mess around with the CPU frequency on this machine. So what I need is a way to get past ATLAS's throttle check. I have seen some discussion of hacking the configure script, but I can't see how to do it myself. No one is answering at the ATLAS sourceforge site, which is not to criticize anyone there. Just want to show what my situation is. So: Anyone know how to get past ATLAS's throttle checking? Thanks.


Solution

  • DISCLAIMER: The following is a dirty, sleazy, under-handed hack (with all the negative connotations that implies, and none of the positive) only to be used as a last resort. Neither I nor the ATLAS developers bear any responsibility for the performance of your ATLAS library suffering as a result of using this.

    Make sure you understand why the CPU throttling check is there in the first place: ATLAS provides "automatic tuning" of some algorithms, and it cannot tune if CPU throttling is enabled (because the benchmark timings are not solid). In the words of the INSTALL.txt: "CPU throttling makes pretty much all timings completely random, and so any ATLAS install will be junk" (emphasis mine). Turn off CPU throttling if you possibly can.

    If there's absolutely no way you can turn off CPU throttling, and you just need a working ATLAS install regardless of how degraded the performance may be, try this:

    cd /path/to/ATLAS
    patch -p0 CONFIG/src/probe_arch.c << EOF
    @@ -238,8 +238,7 @@ int main(int nargs, char **args)
           printf("CPU MHZ=%d\n",
                  ProbeOneInt(OS, asmd, targ, "-m", "CPU MHZ=", &sure));
        if (flags & Pthrottle)
    -      printf("CPU THROTTLE=%d\n",
    -             ProbeOneInt(OS, asmd, targ, "-t", "CPU THROTTLE=", &sure));
    +      printf("CPU THROTTLE=0\n");
        if (flags & P64)
        {
           if (asmd == gas_x86_64)
    EOF
    

    The patch works for atlas 3.10.1.