ATLAS install: Really need to get past CPU throttle check
Asked Answered
S

5

12

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.

Saffier answered 29/1, 2013 at 21:13 Comment(5)
I was going to suggest you post to the Atlas discussion group - but you've already Been There/Done That: sourceforge.net/p/math-atlas/support-requests/886.Clishmaclaver
@paulsm4, yep. This here is my last resort! Thanks.Saffier
One other option is to download and build ATLAS 3.9.79 (released 06/13/12). This is the version before they disabled "the much abused -Si cputhrchk 0". See "ChangeLog" in your source directory for details.Clishmaclaver
3.9.79 doesn't seem to be available at sourceforge. Looks like the last stable version before this switch was removed was 3.8.4 (I think. Don't have it in front of me.) Know anything about that version, like whether it was buggy or problematic in any way? Thanks.Saffier
For what it's worth, -Si cputhrchk 0 seems to have been reinstated as a configure option (I am building 3.10.2).Gisela
P
9

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.

Predestinate answered 30/7, 2013 at 16:36 Comment(3)
Thanks. I understand the performance issue. Will handle with extreme care. And if I have to resort to this, I promise I won't complain about performance. Much obliged.Saffier
I figured you did, Bob, but just knew that if I didn't put that in there, someone else would come along and get bitten. (:Predestinate
So this was over 3 years ago, and the Atlas build still complains - is it still an issue? Secondly, why can't Atlas tune it self with throttling off, save the parameters, and then let us set things back "to normal"?Lupita
V
3

Another way to disable the CPU throttling (as of 3.10.2) is to modify CONFIG/src/config.c's GetFlags() method to set ThrChk to 0.

cd /path/to/ATLAS/CONFIG/src
patch -p0 config.c << EOF
@@ -1026,7 +1026,7 @@
    *verb = 0;
    *NoCygwin = 0;
    *NoF77 = 0;
-   *ThrChk = 1;
+   *ThrChk = 0;
    *nthreads = -1;
    *tids = NULL;
    *omp = *AntThr = 0;
EOF

Note that the maintainers removed -Si cputhrchk 0 due to abuse as indicated by the following comment in config.c:

/* Disabled due to abuse
      fprintf(stderr,
        "      -Si cputhrchk <0/1> : Ignore/heed CPU throttle probe\n");
 */
Vulcanism answered 11/2, 2015 at 21:52 Comment(0)
F
3

With version 3.10.3 there is actually a configure flag --cripple-atlas-performance that makes it possible to compile ATLAS without caring about throttling.

Fadein answered 23/5, 2017 at 6:49 Comment(0)
G
1

How to turn off the CPU throttling in recent computers with newer versions of Fedora Linux (e.g. Fedora 22). Recipe:

1) With root permissions open the file /etc/default/grub and add the parameter "intel_pstate=disable" in the variable GRUB_CMDLINE_LINUX, and save the file, e.g. something like as

GRUB_CMDLINE_LINUX="intel_pstate=disable rhgb quiet" # (other parameters)

2) Re-generate the GRUB configuration to apply the new changes:

a) For BIOS systems: # grub2-mkconfig -o /boot/grub/grub2.cfg

b) For UEFI systems: # grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

and reboot.

Regarding (i) configuring the GRUB Bootloader and (ii) when a system is UEFI or BIOS, in Fedora Linux, e.g. see:

https://docs.fedoraproject.org/en-US/Fedora/22/html/Multiboot_Guide/GRUB-configuration.html

https://docs.fedoraproject.org/en-US/Fedora/23/html/Multiboot_Guide/BOOT-BIOS_or_UEFI.html

Gab answered 28/2, 2016 at 19:35 Comment(0)
S
0

Well, this isn't much of an answer, but just in case anyone is wondering: The sys admins here actually gave me permission to monkey with the CPU throttling, so now ATLAS is building. But, hey, if anyone has a real answer, please let me and the other folks who have viewed this question know. I'm pretty sure I will face this situation again, and maybe with a much more stubborn sys admin to worry about.

Saffier answered 30/1, 2013 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.