SPEC CPU 2017 x86_64 Ubuntu 22.04 LTS LLVM 16.0.6 编译 intrate intspeed

这篇具有很好参考价值的文章主要介绍了SPEC CPU 2017 x86_64 Ubuntu 22.04 LTS LLVM 16.0.6 编译 intrate intspeed。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

源码编译llvm

下载源码

yeqiang@yeqiang-MS-7B23:~/Downloads/src$ git clone --depth=1 -b 7cbf1a2 https://github.com/llvm/llvm-project
正克隆到 'llvm-project'...
warning: 不能发现要克隆的远程分支 7cbf1a2。
fatal: 远程分支 7cbf1a2 在上游 origin 未发现
yeqiang@yeqiang-MS-7B23:~/Downloads/src$ git clone --depth=1 -b llvmorg-16.0.6 https://github.com/llvm/llvm-project
正克隆到 'llvm-project'...
remote: Enumerating objects: 132947, done.
remote: Counting objects: 100% (132947/132947), done.
remote: Compressing objects: 100% (107072/107072), done.
remote: Total 132947 (delta 28313), reused 67422 (delta 21784), pack-reused 0
接收对象中: 100% (132947/132947), 187.34 MiB | 961.00 KiB/s, 完成.
处理 delta 中: 100% (28313/28313), 完成.
注意:正在切换到 '7cbf1a2591520c2491aa35339f227775f4d3adf6'。
 
您正处于分离头指针状态。您可以查看、做试验性的修改及提交,并且您可以在切换
回一个分支时,丢弃在此状态下所做的提交而不对分支造成影响。
 
如果您想要通过创建分支来保留在此状态下所做的提交,您可以通过在 switch 命令
中添加参数 -c 来实现(现在或稍后)。例如:
 
  git switch -c <新分支名>
 
或者撤销此操作:
 
  git switch -
 
通过将配置变量 advice.detachedHead 设置为 false 来关闭此建议
 
正在更新文件: 100% (126307/126307), 完成.

编译安装llvm

yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ cmake ../llvm -DCMAKE_BUILD_TYPE=Release
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ make -j4
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ sudo make install

编译安装clang

yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build-clang
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build-clang/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ cmake ../clang
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ make -j6
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ sudo make install

编译安装openmp

yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build-openmp
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build-openmp/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ cmake ../openmp/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ make -j6
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ sudo make install

x86_64 编译intrate,intspeed

gcc-llvm-intrate-intspeed.patch 内容  

*** Example-gcc-linux-x86.cfg	Fri May  4 20:53:19 2018
--- gcc-llvm.cfg	Wed Jul 26 15:43:37 2023
*************** default:
*** 145,153 ****
     preENV_LD_LIBRARY_PATH  = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64
    #preENV_LD_LIBRARY_PATH  = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64:%{ENV_LD_LIBRARY_PATH}
     SPECLANG                = %{gcc_dir}/bin/
!    CC                      = $(SPECLANG)gcc     -std=c99   %{model}
!    CXX                     = $(SPECLANG)g++     -std=c++03 %{model}
!    FC                      = $(SPECLANG)gfortran           %{model}
     # How to say "Show me your version, please"
     CC_VERSION_OPTION       = -v
     CXX_VERSION_OPTION      = -v
--- 145,153 ----
     preENV_LD_LIBRARY_PATH  = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64
    #preENV_LD_LIBRARY_PATH  = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64:%{ENV_LD_LIBRARY_PATH}
     SPECLANG                = %{gcc_dir}/bin/
!    CC                      = /usr/local/bin/clang   %{model}
!    CXX                     = /usr/local/bin/clang++ %{model}
!    FC                      = gfortran               %{model}
     # How to say "Show me your version, please"
     CC_VERSION_OPTION       = -v
     CXX_VERSION_OPTION      = -v
*************** default:               # data model appl
*** 184,193 ****
--- 184,201 ----
  %endif
     PORTABILITY    = -DSPEC_%{os}_%{suffix}
  
+ # lex.expryy.cc:816:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
+ 520.omnetpp_r:
+    CXXPORTABILITY  = -Wno-error=register
+ 
  521.wrf_r,621.wrf_s:  #lang='F,C'
     CPORTABILITY  = -DSPEC_CASE_FLAG
     FPORTABILITY  = -fconvert=big-endian
  
+ # process *** Error building 525.x264_r base
+ 525.x264_r:
+    CPORTABILITY  = -fcommon
+ 
  523.xalancbmk_r,623.xalancbmk_s:  #lang='CXX'
     PORTABILITY   = -DSPEC_%{os}
  
*************** default:               # data model appl
*** 197,206 ****
--- 205,232 ----
  527.cam4_r,627.cam4_s:  #lang='F,C'
     PORTABILITY   = -DSPEC_CASE_FLAG
  
+ # *** Error building 620.omnetpp_s base
+ 620.omnetpp_s:
+    CXXPORTABILITY  = -Wno-error=register
+ 
+ # *** Error building 625.x264_s base, /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22
+ 625.x264_s:
+    PORTABILITY   = -fcommon
+ 
  628.pop2_s:  #lang='F,C'
     CPORTABILITY    = -DSPEC_CASE_FLAG
     FPORTABILITY    = -fconvert=big-endian
  
+ # Build errors for fprate: 521.wrf_r(base; CE),  527.cam4_r(base; CE) Error: Type mismatch between actual argument
+ 521.wrf_r:
+    FPORTABILITY   = -fallow-argument-mismatch
+ 527.cam4_r:
+    FPORTABILITY   = -fallow-argument-mismatch
+ # 526.blender_r(base; CE) error: call to undeclared function 'kill'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ # error: unknown type name 'mode_t'; did you mean '__mode_t'
+ 526.blender_r:
+    PORTABILITY   = -Wno-error,-Wno-sign-conversion -Wno-sign-conversion -Wno-constant-conversion-Wno-implicit-function-declaration -Wno-int-conversion
+   
  
  #-------- Tuning Flags common to Base and Peak --------------------------------
  
*************** default:               # data model appl
*** 234,240 ****
  #                   switches here.  See also 'About the -fno switches' below.
  #
  default=base:         # flags for all base
!    OPTIMIZE       = -g -O3 -march=native -fno-unsafe-math-optimizations  -fno-tree-loop-vectorize
  
  intrate,intspeed=base: # flags for integer base
     EXTRA_COPTIMIZE = -fno-strict-aliasing -fgnu89-inline
--- 260,266 ----
  #                   switches here.  See also 'About the -fno switches' below.
  #
  default=base:         # flags for all base
!    OPTIMIZE       = -g -O3 -march=native -fno-unsafe-math-optimizations
  
  intrate,intspeed=base: # flags for integer base
     EXTRA_COPTIMIZE = -fno-strict-aliasing -fgnu89-inline

打补丁,编译

cd /opt/cpu2017/
cd config
cp Example-gcc-linux-x86.cfg gcc-llvm.cfg
patch -p0 < ../gcc-llvm-intrate-intspeed.patch
cd /opt/cpu2017
runcpu -c gcc-llvm.cfg --action build intrate intspeed

编译成功日志

root@yeqiang-MS-7B23:/opt/cpu2017/config# cd /opt/cpu2017/
root@yeqiang-MS-7B23:/opt/cpu2017# source shrc
root@yeqiang-MS-7B23:/opt/cpu2017# runcpu -c gcc-llvm.cfg --action build intrate intspeed
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2017 Standard Performance Evaluation Corporation (SPEC)

runcpu v5825
Using 'linux-x86_64' tools
Reading file manifests... read 32272 entries from 2 files in 0.08s (403885 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.
Reading config file '/opt/cpu2017/config/gcc-llvm.cfg'
2 configurations selected:

Action   Benchmarks
------   ----------------------------------------------------------------------
build    intrate                                                               
build    intspeed                                                              
-------------------------------------------------------------------------------

Setting up environment for running intrate...
Starting runcpu for intrate...
Running "specperl /opt/cpu2017/bin/sysinfo" to gather system information.
sysinfo: r5974 of 2018-05-19 (9bcde8f2999c33d61f64985e45859ea9)
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting OS info
sysinfo: ...getting CPU vulnerability status from the kernel
sysinfo: ...getting disk info
sysinfo: ...trying to get DIMM info from dmidecode
Retrieving flags file (/opt/cpu2017/config/flags/gcc.xml)...
Benchmarks selected: 500.perlbench_r, 502.gcc_r, 505.mcf_r, 520.omnetpp_r, 523.xalancbmk_r, 525.x264_r, 531.deepsjeng_r, 541.leela_r, 548.exchange2_r, 557.xz_r, 999.specrand_ir
Compiling Binaries
  Building 500.perlbench_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:45:24]
  Building 502.gcc_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:46:03]
  Building 505.mcf_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:50:02]
  Building 520.omnetpp_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:50:04]
  Building 523.xalancbmk_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:55:30]
  Building 525.x264_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:21]
  Building 531.deepsjeng_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:46]
  Building 541.leela_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:55]
  Building 548.exchange2_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:38]
  Building 557.xz_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:47]
  Building 999.specrand_ir base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:53]

Build successes for intrate: 500.perlbench_r(base), 502.gcc_r(base), 505.mcf_r(base), 520.omnetpp_r(base), 523.xalancbmk_r(base), 525.x264_r(base), 531.deepsjeng_r(base), 541.leela_r(base), 548.exchange2_r(base), 557.xz_r(base), 999.specrand_ir(base)
Build errors for intrate: None

Build Complete
-------------------------------------------------------------------------------

Setting up environment for running intspeed...
Starting runcpu for intspeed...
Running "specperl /opt/cpu2017/bin/sysinfo" to gather system information.
sysinfo: r5974 of 2018-05-19 (9bcde8f2999c33d61f64985e45859ea9)
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting OS info
sysinfo: ...getting CPU vulnerability status from the kernel
sysinfo: ...getting disk info
sysinfo: ...trying to get DIMM info from dmidecode
Retrieving flags file (/opt/cpu2017/config/flags/gcc.xml)...
Benchmarks selected: 600.perlbench_s, 602.gcc_s, 605.mcf_s, 620.omnetpp_s, 623.xalancbmk_s, 625.x264_s, 631.deepsjeng_s, 641.leela_s, 648.exchange2_s, 657.xz_s, 998.specrand_is
Compiling Binaries
  Building 600.perlbench_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:55]
  Building 602.gcc_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:09:35]
  Building 605.mcf_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:13:38]
  Building 620.omnetpp_s base mytest-m64: (build_base_mytest-m64.0001) [2023-07-26 16:13:40]
  Building 623.xalancbmk_s base mytest-m64: (build_base_mytest-m64.0001) [2023-07-26 16:19:12]
  Building 625.x264_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:30:56]
  Building 631.deepsjeng_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:31:20]
  Building 641.leela_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:31:29]
  Building 648.exchange2_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:11]
  Building 657.xz_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:20]
  Building 998.specrand_is base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:26]

Build successes for intspeed: 600.perlbench_s(base), 602.gcc_s(base), 605.mcf_s(base), 620.omnetpp_s(base), 623.xalancbmk_s(base), 625.x264_s(base), 631.deepsjeng_s(base), 641.leela_s(base), 648.exchange2_s(base), 657.xz_s(base), 998.specrand_is(base)
Build errors for intspeed: None

Build Complete
The log for this run is in /opt/cpu2017/result/CPU2017.031.log

runcpu finished at 2023-07-26 16:32:28; 2825 total seconds elapsed

故障处理

*** Error building 600.perlbench_s base /usr/bin/ld: cannot find -lomp: No such file or directory

安装openmp,其中有日志

-- Installing: /usr/local/lib/libomp.so
 文章来源地址https://www.toymoban.com/news/detail-608358.html

到了这里,关于SPEC CPU 2017 x86_64 Ubuntu 22.04 LTS LLVM 16.0.6 编译 intrate intspeed的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • (超详细版)树莓派4b烧录Ubuntu Desktop 22.04 LTS (x64)+换清华源+安装VScode+安装Todesk并实现远程控制

    提前准备 树莓派4b TF卡 读卡器 显示器(支持HDMI接口) 键鼠(USB接口) 下载 Raspberry Pi Imager           这里选择对应你电脑系统的版本        开始烧录 !!! 注意 !!!         先连接显示器再上电(pi不支持热拔插)         如果不明白如何操作,请参考 树小

    2024年03月13日
    浏览(53)
  • Ubuntu22.04 LTS 显卡相关命令

    一、查看显卡型号 二、查看显卡驱动版本 三、查看CUDA、cuDNN版本 四:详细的NVIDIA显卡信息 命令:nvidia-smi(详细的nvidia显卡信息) 注:显示的CUDA版本跟上述的两种方法不一致 一、卸载显卡驱动 二、卸载CUDA 有的安装目录里面没有上面那个pl文件,可以使用下面的命令进行卸

    2024年02月09日
    浏览(40)
  • Ubuntu服务器安装配置slurm (Ubuntu 22.04 LTS)

    Slurm 全称 S imple L inux U tility for R esource M anagement。通常被用于大型Linux服务器 (超算) 上,作为任务管理系统。本文详细讲述如何在 Ubuntu 22.04 LTS 上安装slurm,并进行简单的配置。 其实网上相关的教程已经非常多,但在旧版本的Ubuntu上安装slurm时,通常需要安装一个名为slurm-ll

    2024年02月07日
    浏览(49)
  • 双系统安装ubuntu 22.04 LTS(一步到位)

            作为一个拥有两次都是一次成功安装好双系统的经验的人,我觉得我可以借这个文章仔细讲述一下,让大家都可以双系统安装都是一次成功。为什么有着两次安装经验呢,第一次安装完成后由于电脑的内存不太够了,然后重新装了一个固态和机械硬盘,再次安装了

    2024年01月23日
    浏览(49)
  • Ubuntu最新版本(Ubuntu22.04LTS)安装nfs服务器

    NFS(Network File System)是一种允许不同计算机之间共享文件的网络文件系统。 在Ubuntu 22.04 LTS中,您可以使用以下步骤安装并配置NFS服务器。 一、安装NFS服务器 在Ubuntu 22.04 LTS中,您可以使用以下命令安装NFS服务器: 二、创建共享目录 接下来,您需要创建要共享的目录。在本

    2024年02月05日
    浏览(45)
  • 【QT】Ubuntu22.04 配置 QT6.5 LTS

    进入官网(QT Group)进行账号注册,个人或企业可以获得10天的免费使用,学生则可以获得免费的License,如果是学生的话可以进行学生邮箱验证(Get Educational Licenses),然后获得免费的License,具体如下: 填写这样的表单然后提交,等QT发邮件过来(可能需要十几分钟),然后

    2024年04月27日
    浏览(25)
  • Ubuntu最新版本(Ubuntu22.04LTS)安装Tftp服务及其使用教程

    专栏地址:嵌入式开发 专栏文章: 【01】windows安装VMware最新版本(VMware Workstation 17.0 Pro)详细教程 【02】VMware17虚拟机安装Ubuntu最新版本(Ubuntu22.04LTS)详细步骤 【03】Ubuntu22.04 添加samba,并在windows访问 的详细教程 【04】Vmware Pro 17 设置共享文件夹 【05】Ubuntu最新版本(Ubuntu22.04LT

    2024年02月13日
    浏览(39)
  • 【】Ubuntu Server 22.04 LTS 设置主机信息以及IP地址

    得知网卡为 ens160 编辑配置文件 设置 managed=true network之下全部删除,添加 renderer: NetworkManager 此时会断网一下,如果使用DHCP的话,可能会获得新IP地址。 查看网卡信息 得知:ens160 连接到 Wired connection 1 配置主机名,设置IP地址 此时会断网。然后使用新IP地址连接。 添加位置,

    2024年02月16日
    浏览(45)
  • Ubuntu 22.04 LTS 安装 RTL8188GU 网卡驱动

    腾达(Tenda)150Mbps 迷你免驱网卡 W311MI V5.0 1、查看本机的USB设备列表及其详细信息 可以查看到网卡芯片型号,After Modeswitch表示已经过Modeswitch: 2、安装git、make、gcc、linux-header 安装git、make、gcc: 安装linux-header: 3、安装RTL8188GU芯片驱动 git clone 开源项目 github.com/lwfinger/rtl8x

    2024年02月10日
    浏览(49)
  • Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui

    Stability AI GitHub - Stability-AI/stablediffusion: High-Resolution Image Synthesis with Latent Diffusion Models https://github.com/AUTOMATIC1111/stable-diffusion-webui Ubuntu 20.04 LTS 安装 nvidia 驱动 + cuda 11.8 从开始到放弃!_hkNaruto的博客-CSDN博客 打开一个新终端,配置源  编辑~/.condarc 内容如下即可。 注意: 以下方

    2024年02月12日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包