parsec(The parsec benchmark suit )使用教程

本文详细介绍了PARSEC3.0的下载、安装及使用过程,包括环境搭建、模块安装与执行命令,特别关注blackscholes模块的安装与测试,适合初学者快速上手。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文参考:(parsec官网)http://parsec.cs.princeton.edu/

首先,下载这个工具是很慢的,我下载的是PARSEC 3.0 Core和PARSEC 3.0 Native Inputs,前者是核心,但是缺少了很多文件,只有最关键的部分。后者是一个提供输入文件的压缩包。如果仅仅是测试一下用法,下载前者即可,我是需要长时间运行才下载的第二个包。

具体使用方法如下:

  1. 解压PARSEC 3.0 Core
    tar zxvf parsec-xxx.tar.gz

  2. 进入
    cd parsec-3.0
  3. 输入命令
    source env.sh
  4. 到这里,环境就成功了,下面就可以使用命令了,parsec最关键的命令就是parsecmgmt(我也只知道着一个。。)
  5. 使用下面命令查看状态,可以看到,里面很多模块都没有安装,下一步就以blackscholes 为例,安装并使用,下面的配图是安装过的
    parsecmgmt -a status     # 参数 -a 是你要执行的操作,当前是查看状态,所以是status 

  6.  

    安装blackscholes,下面命令将安装 blackscholes,安装过后如上图所示
    parsecmgmt -a build -p blackscholes  # 参数 -p 是指明 -a 操作的模块 , 当前是 blackscholes 模块

     

  7. 执行
    parsecmgmt -a run -p blackscholes -i test  # -i 是输入参数,输入有test ,simdev ,simlarge ,native ,...

  8. 如果是下载的 CORE 版本的使用者,将无法使用除了 test 和 simdev 输入以外的输入,比如 native 就不能使用,因为核心版本没有安装其他输入
  9. 使用以下命令,进入输入文件夹,就会发现里面只有两个输入文件(我的有三个,native那个是我自己拷贝进去的),如果要想使用其他输入模式,可以下载完整版本,因为我是需要native,所以我自己下载了一个native的包,在文章开始的时候已经说过
    cd pkges/apps/blackscholes/imputs      # 进入模块blackscholes的输入文件夹

  10. 如果要想使用 native 输入模式,就拷贝parsec-2.1-native.tar.gz对应位置的输入文件,使用下图最后一行命令
  11. 之后就可以使用 native 作为输入了
  12. 在安装模块的时候还有一个 -c  参数,可以指定编译模块使用的编译器(我也不懂,就这样理解吧,有知道的请留言指点,指导文档我也没有仔细翻译)
    parsec -a build -p blackscholes -c gcc-serial   # 这就可以安装一个不同版的blackscholes了

     

说在最后,执行的时候会有很多错误,一定要仔细查看输出代码,仔细找找有没有‘error'这个词

在安装之前,一定要确保 机器上有 gcc 和 g++

-- end --

 

转载于:https://www.cnblogs.com/PPWEI/p/9741685.html

Cross-compiling Parsec benchmark for ARM architecture involves setting up a build environment on your host machine (likely x86 or x64) that can generate code for ARM targets. Here's a general outline of the steps: 1. **Install required tools**: Ensure you have installed a compiler and toolchain that supports ARM, like `gcc-arm-none-eabi` or `clang-arm`. 2. **Set up target environment**: You'll need to configure the toolchain with the correct paths and settings for the ARM target. This may involve creating a separate configuration file or specifying flags when invoking the compiler. ```sh export CC=arm-none-eabi-gcc export CXX=arm-none-eabi-g++ ``` 3. **Download Parsec**: Download the latest version of Parsec, which is a benchmarking suite, and extract it to a suitable location. 4. **Configure Makefile**: If Parsec has a Makefile, modify it to specify the target architecture. Look for lines similar to `CC`, `CFLAGS`, or `LDFLAGS`. Add or update them as needed, using the ARM-specific versions. 5. **Build for ARM**: Run `make clean && make` in the Parsec directory, replacing `make` with the appropriate command for your build system (e.g., `ninja` if you're using Ninja). ```sh make TARGET=arm-linux-gnueabihf ``` 6. **Test on ARM device or emulator**: Copy the generated `.elf` (executable) file to an ARM device or use an emulator to run it. **Related questions:** 1. What specific version of the ARM toolchain do I need? 2. How can I deal with dependencies if they don't have ARM builds available? 3. Are there any libraries or patches I need to include for compatibility with Parsec on ARM?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值