PARSEC benchmark 编译
来源:互联网 发布:中国网络声优排行榜 编辑:程序博客网 时间:2024/06/06 03:01
- Step01 配置环境
- Step02 编译benchmark
- Step03 产生脚本rcS文件
- Step04 关于输入文件
- Step05 将benchmark所需文件mount进模拟系统
- 附录
从官网parsec.cs.princeton.edu下载PARSEC3.0
根据Seminar_Parsec3.pdf介绍的内容
Step01 配置环境
You can modify your environment to make the PARSEC tools and its
man pages available at the command line (without full path)The env.sh script in the PARSEC root directory will do that for you
Source it as follows (example assumes bash shell):
source env.shIf you use PARSEC a lot you can add that to your login scripts to
have it always available
根据介绍,在终端进入parsec-3.0文件夹,键入命令:
$ source env.sh
Step02 编译benchmark
Use the following command to get some help:
parsecmgmt -hYou can build a PARSEC workload as follows:
parsecmgmt -a build -p [suite].[PACKAGE]Flag ‘-a’ specifies the desired action, flag ‘-p’ gives one or more
packages‘parsecmgmt -a info’ gives you a list of all available packages
根据pdf说明,想要知道可以build的benchmark的列表,输入命令:
$ parsecmgmt -a info[PARSEC] PARSEC Distribution v3.0-beta-20150206[PARSEC][PARSEC] PACKAGES[PARSEC][PARSEC] parsec.blackscholes [1] (computational finance)[PARSEC] Prices a portfolio of options[PARSEC] Package Group: apps[PARSEC] Contributor: Intel Corp.[PARSEC] Aliases: all workload parsec apps pthreads tbb openmp[PARSEC][PARSEC] parsec.bodytrack [1] (computer vision)[PARSEC] Tracks a human body through space[PARSEC] Package Group: apps[PARSEC] Contributor: Intel Corp.[PARSEC] Aliases: all workload parsec apps pthreads tbb openmp[PARSEC][PARSEC] parsec.canneal [1] (engineering)[PARSEC] Optimizes the routing of a chip design[PARSEC] Package Group: kernels[PARSEC] Contributor: Princeton University[PARSEC] Aliases: all workload parsec kernels pthreads……
编译举例,编译blackscholes:
$ parsecmgmt -a build -p blackscholes[PARSEC] Packages to build: parsec.blackscholes[PARSEC] [========== Building package parsec.blackscholes [1] ==========]……[PARSEC] [1] Bienia. Benchmarking Modern Multiprocessors. Ph.D. Thesis, 2011.[PARSEC][PARSEC] Done.
此时,可执行文件在路径/parsec-3.0/pkgs/apps/blackscholes/inst/amd64-linux.gcc/bin下。
Step03 产生脚本.rcS文件
在parsec-3.0文件夹中写入一个writescripts.pl文件(代码见附录),输入 ./writescripts.pl <benchmark> <num_of_thread>
产生相应的.rcS文件。
举例,输入命令如下:
$ ./writescripts.pl blackscholes 4
会产生脚本文件如下:
blackscholes_4c_simdev.rcS blackscholes_4c_simsmall.rcSblackscholes_4c_simlarge.rcS blackscholes_4c_test.rcSblackscholes_4c_simmedium.rcS
Step04 关于输入文件
上一步脚本文件中的test、simsmall、simmedium、simlarge、simdev对应的输入文件均在/parsec-3.0/pkgs/apps/blackscholes/inputs路径下,解压对应文件即可:
$parsec-3.0$ ls ./pkgs/apps/blackscholes/inputsinput_simdev.tar input_simmedium.tar input_test.tarinput_simlarge.tar input_simsmall.tar
Step05 将benchmark所需文件mount进模拟系统
- 清单:
- 可执行文件 eg. blackscholes
- 输入文件 eg. in_4k.txt
- 执行文本 eg. blackscholes_4c_simsmall.rcS
其中,前两项mount进模拟系统,过程参考GemFI-Full System全系统仿真。
最后一项放到相应的位置即可。
附录
writescripts.pl文件代码
#!/usr/bin/perl@benches = ('blackscholes', 'bodytrack', 'canneal', 'dedup', 'facesim', 'ferret', 'fluidanimate', 'freqmine', 'streamcluster', 'swaptions', 'vips', 'x264', 'rtview' );$inputsets[1] = "test";$inputsets[2] = "simdev";$inputsets[3] = "simsmall";$inputsets[4] = "simmedium";$inputsets[5] = "simlarge";$checkpointing = 0;# check for proper inputif( scalar(@ARGV) < 2 || scalar(@ARGV) > 3 ) { printUsage(); exit;} elsif( scalar(@ARGV) > 2 ) { for( $i = 2; $i < scalar(@ARGV); $i++ ) { if( $ARGV[$i] eq "--ckpts" ) { $checkpointing = 1; } else { print "Unrecognized option: $ARGV[$i]\n"; printUsage(); exit; } }}# grab input$bench = $ARGV[0];$found = 0;foreach $b (@benches) { if( $bench eq $b ) { $found = 1; }}if( ! $found ) { printBenches();}# set up the input dir$inputdir = "/parsec/install/inputs/$bench/";$numthreads = int($ARGV[1]);# open the input sets file:open( INFILE, "./inputsets.txt" );$found = 0;while( ! $found && ($line = <INFILE>) ) { if( $line =~ m/$bench/ ) { $found = 1; chomp( $line ); @tokens = split(/\;/,$line); # replace the input dir and numthreads for( $i = 0; $i < scalar(@tokens); $i++ ) { while( $tokens[$i] =~ m/<inputdir>/ ) { $tokens[$i] =~ s/<inputdir>/$inputdir/; } $tokens[$i] =~ s/<nthreads>/$numthreads/; # print "$tokens[$i]\n"; } for( $i = 1; $i < scalar(@inputsets); $i++ ) { $inp = $inputsets[$i]; if( $checkpointing == 0 ) { $filename = $bench."_".$numthreads."c_".$inp.".rcS"; } else { $filename = $bench."_".$numthreads."c_".$inp."_ckpts.rcS"; } open( FILE, "> $filename" ) or die "File problem\n"; print FILE "#!/bin/sh\n\n"; print FILE "# File to run the $bench benchmark\n\n"; if( $bench eq "vips" ) { print FILE "export IM_CONCURRENCY=$numthreads\n"; } if( $checkpointing == 0 ) { print FILE "cd /parsec/install/bin\n"; } else { print FILE "cd /parsec/install/bin.ckpts\n"; } if( $checkpointing == 0 ) { print FILE "/sbin/m5 switchcpu\n"; } print FILE "/sbin/m5 dumpstats\n"; print FILE "/sbin/m5 resetstats\n"; print FILE "./$bench $tokens[$i]\n"; print FILE "echo \"Done :D\"\n"; print FILE "/sbin/m5 exit\n"; print FILE "/sbin/m5 exit\n"; close( FILE ); } }}# close the input file:close( INFILE );######################### Methods########################sub printUsage() { print "Writes the .rcS files for specified parsec benchmark\n"; print "with specified number of threads\n\n"; print "Usage:\n"; print "\t./writescripts.pl <benchmark> <nthreads> [opt: --ckpts]\n"; print "Options:\n"; print " --ckpts Use the checkpoint binaries in scripts\n";}sub printBenches() { print "Valid PARSEC Benchmarks:\n"; foreach $b (@benches) { print "\t$b\n"; }}
- PARSEC benchmark 编译
- PARSEC benchmark 编译
- bodytrack 转载自:parsec benchmark
- GPU benchmark 编译问题
- benchmark
- Benchmark
- benchmark
- Benchmark
- GPGPU-SIM 之 单步编译 BENCHMARK
- 关于CPUSPEC2006中的447、483benchmark编译错误的解决方案
- windows 7 caffe2编译提示缺少benchmark.lib
- 一段Parsec CSV文件的haskell代码
- GC1030 benchmark
- my benchmark
- Factstone Benchmark
- Factstone Benchmark
- Factstone Benchmark
- Factstone Benchmark
- Eclipse从数据库逆向生成Hibernate带注解的实体类
- 【转载】缓存淘汰算法--LRU算法
- ZOJ 3789 - Gears (并查集)
- 说说ReactiveCocoa 2
- poj 2503 Babelfish(字典树或着STL)
- PARSEC benchmark 编译
- 白盒测试中的六种覆盖方法
- 这些面试机会,你该主动放弃!
- devenv.exe - assert failure
- 设计模式——模版方法模式
- 常见的三种Web服务架构
- php下基于百度BAE的微信SDK框架
- 异步加载
- 测试一下看这个能用不