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       = -vCXX_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       = -vCXX_VERSION_OPTION      = -v
*************** default:               # data model appl
*** 184,193 ****
--- 184,201 ----%endifPORTABILITY    = -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_FLAGFPORTABILITY  = -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_FLAGFPORTABILITY    = -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-vectorizeintrate,intspeed=base: # flags for integer baseEXTRA_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-optimizationsintrate,intspeed=base: # flags for integer baseEXTRA_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 BinariesBuilding 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: NoneBuild 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 BinariesBuilding 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: NoneBuild Complete
The log for this run is in /opt/cpu2017/result/CPU2017.031.logruncpu 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
 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/8459.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

全网最牛,Jmeter接口自动化-读取用例执行并结果回写(详细整理)

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 1、环境准备 下载…

网络安全(零基础)自学

一、网络安全基础知识 1.计算机基础知识 了解了计算机的硬件、软件、操作系统和网络结构等基础知识&#xff0c;可以帮助您更好地理解网络安全的概念和技术。 2.网络基础知识 了解了网络的结构、协议、服务和安全问题&#xff0c;可以帮助您更好地解决网络安全的原理和技术…

windows下安装composer

安装Php 教程 下载composer 官网 中文网站 exe下载地址 下载好exe 双击运行 找到php.ini注释一行代码 测试 composer -v说明安装成功 修改源 执行以下命令即可修改 composer config -g repo.packagist composer https://packagist.phpcomposer.com # 查看配置…

【js Set()】

Set() 是 JavaScript 中的数据结构之一&#xff0c;它类似于数组&#xff0c;但是每个值都是唯一的&#xff08;没有重复的值&#xff09;。它可以存储任何类型的值&#xff0c;包括原始类型和对象引用。 创建一个 Set 对象的语法如下&#xff1a; const mySet new Set();或…

SAFe工具,SAFe规模化敏捷工具,SAFe实施流程,SAFe框架管理工具

​Leangoo领歌敏捷工具覆盖了敏捷项目研发全流程&#xff0c;包括小型团队敏捷开发&#xff0c;Scrum of Scrums大规模敏捷。 随着SAFe的越来越普及&#xff0c;Leangoo本次上线提供了完整的SAFe框架功能&#xff0c;包括&#xff1a;Program Backlog&#xff0c;PI规划&#…

从零开始学习自动驾驶路径规划-环境配置

从零开始学习自动驾驶路径规划-环境配置 前面&#xff0c;每个人遇到的问题不一样&#xff0c;这里记录了配置步骤和目前遇到的问题&#xff0c;会持续更新报错解决方法。配置时有报错请认真看报错经验 环境配置步骤&#xff08;18.04和20.04都可以&#xff0c;有些问题没遇到…

医疗小程序:提升服务质量与效率的智能平台

在医疗行业&#xff0c;公司小程序成为提高服务质量、优化管理流程的重要工具。通过医疗小程序&#xff0c;可以方便医疗机构进行信息传播、企业展示等作用&#xff0c;医疗机构也可以医疗小程序提供更便捷的预约服务&#xff0c;优化患者体验。 医疗小程序的好处 提升服务质量…

使用element-ui的滚动条

1.把想要出滚动条的内容放在下边标签里即可&#xff1a; <el-scrollbar style"height:100%;width:100%"></el-scrollbar>2.如果不想要横向的滚动条&#xff0c;添加css&#xff1a; .el-scrollbar__wrap {overflow-x: hidden; }3.如果相让滚动条一直显…

C# List 详解六

目录 35.MemberwiseClone() 36.Remove(T) 37.RemoveAll(Predicate) 38.RemoveAt(Int32) 39.RemoveRange(Int32, Int32) 40.Reverse() 41.Reverse(Int32, Int32) C# List 详解一 1.Add(T)&#xff0c;2.AddRange(IEnumerable)&#xff0c;3…

css——box-sizing属性

含义 盒子模型由四部分构成&#xff0c;外边距(margin), 边框(border),内边距(padding), 内容content box-sizing 就是指定盒子的大小和结构的。 box-sizing: content-box; //默认值 内容真正宽度 设置的宽度box-sizing: border-box; // 内容真正宽度width 设置的width- 左右p…

ChatGPT应用|科大讯飞星火杯认知大模型场景创新赛开始报名了!

ChatGPT发布带来的 AI 浪潮在全球疯狂蔓延&#xff0c;国内掀起的大模型混战已经持续半年之久&#xff0c;国产大模型数量正以惊人的速度增长&#xff0c;据不完全统计&#xff0c;截止7月14号已经达到了111个&#xff0c;所谓的“神仙打架”不过如此了吧。 &#xff08; 包括但…

【Hammerstein模型的级联】快速估计构成一连串哈默斯坦模型的结构元素研究(Matlab代码实现)

目录 &#x1f4a5;1 概述 &#x1f4da;2 运行结果 &#x1f389;3 参考文献 &#x1f308;4 Matlab代码实现 &#x1f4a5;1 概述 在许多振动应用中&#xff0c;所研究的系统略微非线性。Hammerstein模型的级联可以方便地描述这样的系统。Hammerstein提供了一种基于指数正弦…

【Matlab】基于径向基神经网络的数据分类预测(Excel可直接替换数据)

【Matlab】基于径向基神经网络的数据分类预测(Excel可直接替换数据) 1.模型原理2.数学公式3.文件结构4.Excel数据5.分块代码6.完整代码7.运行结果1.模型原理 基于径向基神经网络(Radial Basis Function Neural Network,RBFNN)的数据分类预测是一种基于神经网络的分类模型…

Windows Server 2012 搭建网关服务器并端口转发

需求 使用 Windows server 作为Hyper-V 虚拟出许多虚拟机&#xff0c;基本上都分配了内网地址&#xff0c;现在需要这些虚拟机访问外网&#xff0c;或者外网直接访问这些虚拟机&#xff0c;必须配置一个网关服务器。我决定直接使用 Windows 的远程访问中的 NAT 服务来完成。 …

PHP注册、登陆、6套主页-带Thinkphp目录解析-【强撸项目】

强撸项目系列总目录在000集 PHP要怎么学–【思维导图知识范围】 文章目录 本系列校训本项目使用技术 上效果图主页注册&#xff0c;登陆 phpStudy 设置导数据库项目目录如图&#xff1a;代码部分&#xff1a;控制器前台的首页 其它配套页面展示直接给第二套方案的页面吧第三套…

如何安装 MySQL 客户端 - Mac, Ubuntu, CentOS 或 Windows

官方的 MySQL 客户端 mysql&#xff0c;也被称为 MySQL CLI&#xff0c;是个可以和你的 MySQL 服务器进行交互的命令行工具。 本文介绍了如何分别在 Mac, Ubuntu, Debian 和 Windows 上安装 mysql。 准备工作 首先&#xff0c;确认一下你之前是否安装过某个 MySQL 客户端。如…

【云原生】Kubernetes工作负载-StatefulSet

StatefulSet StatefulSet 是用来管理有状态应用的工作负载 API 对象 StatefulSet 用来管理某 Pod 集合的部署和扩缩&#xff0c; 并为这些 Pod 提供持久存储和持久标识符 和 Deployment 类似&#xff0c; StatefulSet 管理基于相同容器规约的一组 Pod。但和 Deployment 不同…

【Vue3】computed 计算属性

computed 基础语法 <template><div><div>性&#xff1a;<input v-model"firstName" type"text"></div><div>名&#xff1a;<input v-model"lastName" type"text"></div><div>…

Android版本的发展4-13

Android 4.4 KitKat 1、通过主机卡模拟实现新的 NFC 功能。 2、低功耗传感器&#xff0c;传感器批处理&#xff0c;步测器和计步器。 3、全屏沉浸模式&#xff0c;隐藏所有系统 UI&#xff0c;例如状态栏和导航栏。它适用于鲜艳的视觉内容&#xff0c;例如照片、视频、地图、…

API自动化测试总结

目录 Jmeter是怎么做API自动化测试的&#xff1f; Jmeter中动态参数的处理&#xff1f; 怎么判断前端问题还是后端问题&#xff1f; 详细描述下使用postman是怎么做API的测试的&#xff1f; 资料获取方法 Jmeter是怎么做API自动化测试的&#xff1f; 1、首先在JMeter里面…