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.
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.
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");
*/
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.
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
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.
© 2022 - 2024 — McMap. All rights reserved.
-Si cputhrchk 0
seems to have been reinstated as aconfigure
option (I am building 3.10.2). – Gisela