ATLAS安装:真的需要通过CPU油门检查

时间:2022-07-17 04:08:17

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.

ATLAS 3.10.1不会安装在我的组织CentOS 6上。因为它检测CPU节流。在该包的旧版本中,有一个配置标志来关闭油门止回阀(-Si cputhrchk 0),不管怎样,继续前进。这个选项在几个版本之前就已经被删除了。我理解这一决定背后的原因——开发人员担心他们的软件的性能和声誉,CPU节流使得ATLAS无法自我调整。很好。我的问题是,不管ATLAS性能如何,我只是需要构建它。有一些方法可以停止节流,我知道,但是我没有,也可能不会得到在这台机器上处理CPU频率的许可。所以我需要的是通过ATLAS的油门检查。我看到过一些关于对configure脚本进行黑客攻击的讨论,但我自己也看不懂。没有人在阿特拉斯sourceforge网站上回答,这不是批评任何人。只是想展示一下我的处境。所以:有人知道如何通过阿特拉斯的节流检查吗?谢谢。

5 个解决方案

#1


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.

免责声明:以下是一种肮脏、庸俗、不正当的伎俩(带有所有暗示的负面含义,没有任何正面含义),只能用作最后的手段。我和ATLAS开发人员都不为您的ATLAS库的性能承担任何责任。

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.

确保您首先了解CPU节流检查的原因:ATLAS提供一些算法的“自动调优”,如果启用了CPU节流,它就不能调优(因为基准时间不是固定的)。用安装的话来说。txt:“CPU节流几乎所有的时间都是随机的,所以任何ATLAS安装都是垃圾”(重点是我的)。如果可能的话,关闭CPU节流。

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:

如果完全没有办法关闭CPU节流,并且您只需要安装一个工作的ATLAS,而不管性能有多差,请尝试以下方法:

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.

该补丁适用于atlas 3.10.1。

#2


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.

另一种禁用CPU节流(从3.10.2开始)的方法是修改CONFIG/src/ CONFIG。c的GetFlags()方法将ThrChk设置为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:

注意,在config.c中,维护人员删除了-Si cputhrchk 0,原因如下。

/* Disabled due to abuse
      fprintf(stderr,
        "      -Si cputhrchk <0/1> : Ignore/heed CPU throttle probe\n");
 */

#3


2  

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.

在3.10.3版本中,实际上有一个配置标志——cripple- atlasse性能,使编译ATLAS不需要考虑节流。

#4


1  

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

如何在最新版本的Fedora Linux(例如Fedora 22)中关闭CPU节流。配方:

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

1)使用root权限打开文件/etc/default/grub,并在变量GRUB_CMDLINE_LINUX中添加参数“intel_pstate=disable”,并保存文件,例如as

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

GRUB_CMDLINE_LINUX="intel_pstate=禁用rhgb quiet" #(其他参数)

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

2)重新生成GRUB配置,应用新的更改:

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

a)对于BIOS系统:# grub2-mkconfig -o /boot/grub/grub2.cfg

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

b)对于UEFI系统:# 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:

关于(i)配置GRUB Bootloader,以及(ii)当系统是UEFI或BIOS时,在Fedora Linux中,例如:

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

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

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

#5


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.

好吧,这并不是一个很好的答案,但以防有人怀疑:这里的系统管理员实际上允许我对CPU进行控制,所以现在ATLAS正在构建。但是,嘿,如果有人有真正的答案,请让我和其他看过这个问题的人知道。我很确定我将再次面对这种情况,也许需要考虑一个更加顽固的系统管理员。

#1


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.

免责声明:以下是一种肮脏、庸俗、不正当的伎俩(带有所有暗示的负面含义,没有任何正面含义),只能用作最后的手段。我和ATLAS开发人员都不为您的ATLAS库的性能承担任何责任。

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.

确保您首先了解CPU节流检查的原因:ATLAS提供一些算法的“自动调优”,如果启用了CPU节流,它就不能调优(因为基准时间不是固定的)。用安装的话来说。txt:“CPU节流几乎所有的时间都是随机的,所以任何ATLAS安装都是垃圾”(重点是我的)。如果可能的话,关闭CPU节流。

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:

如果完全没有办法关闭CPU节流,并且您只需要安装一个工作的ATLAS,而不管性能有多差,请尝试以下方法:

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.

该补丁适用于atlas 3.10.1。

#2


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.

另一种禁用CPU节流(从3.10.2开始)的方法是修改CONFIG/src/ CONFIG。c的GetFlags()方法将ThrChk设置为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:

注意,在config.c中,维护人员删除了-Si cputhrchk 0,原因如下。

/* Disabled due to abuse
      fprintf(stderr,
        "      -Si cputhrchk <0/1> : Ignore/heed CPU throttle probe\n");
 */

#3


2  

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.

在3.10.3版本中,实际上有一个配置标志——cripple- atlasse性能,使编译ATLAS不需要考虑节流。

#4


1  

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

如何在最新版本的Fedora Linux(例如Fedora 22)中关闭CPU节流。配方:

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

1)使用root权限打开文件/etc/default/grub,并在变量GRUB_CMDLINE_LINUX中添加参数“intel_pstate=disable”,并保存文件,例如as

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

GRUB_CMDLINE_LINUX="intel_pstate=禁用rhgb quiet" #(其他参数)

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

2)重新生成GRUB配置,应用新的更改:

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

a)对于BIOS系统:# grub2-mkconfig -o /boot/grub/grub2.cfg

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

b)对于UEFI系统:# 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:

关于(i)配置GRUB Bootloader,以及(ii)当系统是UEFI或BIOS时,在Fedora Linux中,例如:

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

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

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

#5


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.

好吧,这并不是一个很好的答案,但以防有人怀疑:这里的系统管理员实际上允许我对CPU进行控制,所以现在ATLAS正在构建。但是,嘿,如果有人有真正的答案,请让我和其他看过这个问题的人知道。我很确定我将再次面对这种情况,也许需要考虑一个更加顽固的系统管理员。