First, you must have
Spec2000You can install the program on a CD, or copy it to the local hard disk in a certain way. By reading the README file, follow these steps step by step.
Assume that
Spec2000/Directory.
After the installation is complete, configure the runtime environment, open a shell, and enter
Spec2000Directory.
1. $. SHRC
This command is usually run in the current shell. In this way, the running is configured in the Current Shell environment.
Spec2000The required environment, otherwise it cannot run.
2. $ runspec -- size = test -- noreportable -- iterations = 1 OLAP
In this way, you can use the test dataset to test the program !!
There are three test sets: Test, train, and ref. To run the ref test set, you only need to set-size = ref above. There are several test programs. To run the gzip program, you only need to change the program name to gzip.
========================================================== ========
How the cint2000 program runs in different Test Sets
Code: |
<Test> Bzip2 input. Random 2> input. Random. out 2> input. Random. Err </Test> <Train> Bzip2 input. Compressed 8> input. Compressed. out 2> input. Compressed. Err </Train> <Ref> Bzip2 input. Source 58> input. Source. out 2> input. Source. Err Bzip2 input. Graphic 58> input. Graphic. out 2> input. Graphic. Err Bzip2 input. Program 58> input. program. out 2> input. program. Err </Ref><Test> Crafty <crafty. In> crafty. out 2> crafty. Err </Test> <Train> Crafty <crafty. In> crafty. out 2> crafty. Err </Train> <Ref> Crafty <crafty. In> crafty. out 2> crafty. Err </Ref> <Test> Gap-L./-Q-M 64 m <test. In> test. out 2> test. Err </Test> <Train> Gap-L./-Q-M 128 M <train. In> train. out 2> train. Err </Train> <Ref> Gap-L./-Q-m 192 m <ref. In> ref. out 2> ref. Err </Ref> <Test> CCCP. I-o CCCP. S> CCCP. out 2> CCCP. Err </Test> <Train> Cp-decl. I-O cp-decl.s> cp-decl.out 2> cp-decl.err </Train> <Ref> Ca-166. I-O 166.s> 166.out 2> 166.err PC3 200. I-O 200.s> 200.out 2> 200.err PC3 expr. I-o expr. S> expr. out 2> expr. Err PC3 integrate. I-o integrate. S> integrate. out 2> integrate. Err Ca-scilab. I-o SCILAB. S> SCILAB. out 2> SCILAB. Err </Ref> <Test> Gzip input. Compressed 2> input. Compressed. out 2> input. Compressed. Err </Test> <Train> Gzip input. Combined 32> input. Combined. out 2> input. Combined. Err </Train> <Ref> Gzip input. Source 60> input. Source. out 2> input. Source. Err Gzip input. Log 60> input. log. out 2> input. log. Err Gzip input. Graphic 60> input. Graphic. out 2> input. Graphic. Err Gzip input. Random 60> input. Random. out 2> input. Random. Err Gzip input. program 60> input. program. out 2> input. program. Err </Ref> <Test> Title: Title </Test> <Train> Title: Title </Train> <Ref> Title: Title </Ref> <Test> Parser 2.1.dict-Batch <test. In> test. out 2> test. Err </Test> <Train> Parser 2.1.dict-Batch <train. In> train. out 2> train. Err </Train> <Ref> Parser 2.1.dict-Batch <ref. In> ref. out 2> ref. Err </Ref> <Test> Perlbmk-I.-I./lib test. pl <test. In> test. out 2> test. Err </Test> <Train> Perlbmk-I./lib diffmail. pl 2 350 15 24 23 150> 2.350.15.24.23.150.out 2> 2.350.15.24.23.150.err Perlbmk-I./lib perfect. pl B 3> B .3.out 2> B .3.err Perlbmk-I.-I./lib scrabbl. pl <scrabbl. In> scrabbl. out 2> scrabbl. Err </Train> <Ref> Perlbmk-I./lib diffmail. pl 2 550 15 24 23 100> 2.550.15.24.23.100.out 2> 2.550.15.24.23.100.err Perlbmk-I.-I./lib makerand. pl> makerand. out 2> makerand. Err Perlbmk-I./lib perfect. pl B 3 M 4> B .3.m. 4.out 2> B .3.m. 4.err Perlbmk-I./lib splitmail. pl 850 5 19 18 1500> 850.5.19.18.1500.out 2> 850.5.19.18.1500.err Perlbmk-I./lib splitmail. pl 704 12 26 16 836> 704.12.26.16.836.out 2> 704.12.26.16.836.err Perlbmk-I./lib splitmail. pl 535 13 25 24 1091> 535.13.25.24.20.1.out 2> 535.13.25.24.20.1.err Perlbmk-I./lib splitmail. pl 957 12 23 26 1014> 957.12.23.26.1014.out 2> 957.12.23.26.1014.err </Ref> <Test> Twolf test> test. stdout 2> test. Err </Test> <Train> Twolf train> train. stdout 2> train. Err </Train> <Ref> Twolf ref> ref. stdout 2> ref. Err </Ref> <Test> Vortex lendian. Raw> vortex. out2 2> vortex. Err </Test> <Train> Vortex lendian. Raw> vortex. out2 2> vortex. Err </Train> <Ref> Vortex lendian1.raw> vortex1.out2> vortex1.err Vortex lendian2.raw> vortex2.out2> vortex2.err Vortex lendian3.raw> vortex3.out2> vortex3.err </Ref> <Test> VPR net. In arch. In place. Out Dum. Out-nodisp-place_only-init_t 5-exit_t 0.005-alpha_t 0.9412-inner_num 2> place_log.out 2> place_log.err VPR net. In arch. in place. In route. Out-nodisp-route_only-route_chan_width 15-pres_fac_mult 2-acc_fac 1-Route 4-initial_pres_fac 8> route_log.out 2> route </Test> <Train> VPR net. In arch. In place. Out Dum. Out-nodisp-place_only-init_t 5-exit_t 0.005-alpha_t 0.9412-inner_num 2> place_log.out 2> place_log.err VPR net. In arch. in place. In route. Out-nodisp-route_only-route_chan_width 15-pres_fac_mult 2-acc_fac 1-Route 4-initial_pres_fac 8> route_log.out 2> route </Train> <Ref> VPR net. In arch. In place. Out Dum. Out-nodisp-place_only-init_t 5-exit_t 0.005-alpha_t 0.9412-inner_num 2> place_log.out 2> place_log.err VPR net. In arch. in place. In route. Out-nodisp-route_only-route_chan_width 15-pres_fac_mult 2-acc_fac 1-Route 4-initial_pres_fac 8> route_log.out 2> route </Ref> |
Automatically test all programs using various datasets and record the running time. The script I wrote is as follows:
Code: |
#/Bin/bash # Filename: myrun. Sh# Runspec -- size = test -- noreportable -- iterations = 1 Gzip # Application names Apps = "Bzip2 crafty gzip GCC gap BMP parser perlbmk twolf VPR vortex" TMP = tmpfile Log = timelog 'date + "% m-% d-% Y "' # Config running environment . SHRC # Running with test Dataset Echo ''> $ log Echo '================= running with test dataset ================================='> $ log For app in $ apps Do Echo "-------------- testing: $ app ------------"> $ log (Time runspec -- size = test -- noreportable -- iterations = 1 $ APP)> $ TMP 2> $ log Done # Running with train Dataset Echo '================== running with train dataset ==============================='> $ log For app in $ apps Do Echo "-------------- testing: $ app ------------"> $ log (Time runspec -- size = train -- noreportable -- iterations = 1 $ APP)> $ TMP 2> $ log Done # Running with ref Dataset Echo '================= running with ref dataset ================================='> $ log For app in $ apps Do Echo "-------------- testing: $ app ------------"> $ log (Time runspec -- size = ref -- noreportable -- iterations = 1 $ APP)> $ TMP 2> $ log Done Rm $ TMP |
For us, we are working on a simulator project, so we need to useSpec2000To test the performance of our simulator, but our simulator uses not the x86 instruction set, but the MIPs command, so I need to re-compile each program and configure different compilation options. My idea is to compile these programs, copy executable files and test datasets to another directory, and then perform your own testing under that directory. My prepare. Sh script is used for this job.
Code: |
#! /Bin/bash # Filename: Prepare. Sh Apps = "256.bzip2 186. Crafty 254.gap 176.gcc 164.gzip 181.olap 197. parser 253. perlbmk 300. twolf 255. Vortex 175.vpr" # Apps = "181.mcf" Home = "/samba/data/Spec2000/" Srcpath = "/samba/data/Spec2000/Benchspec/cint2000 /" Dstpath = "/work/LiRui/sandfox2/bin/Spec2000/Cint2000 /" For app in $ apps Do # First step: Copy dataset to each test destination DST = "$ {dstpath }$ {app # [^.] *.}" If! [-D $ DST] Then Mkdir $ DST Fi CP $ {srcpath }$ {app}/data/* $ {DST}-RF# Second step: Build x86, MIPS-dynamic, MIPS-static Binaries Src = "$ {srcpath }$ {app}/run/00000001" If [-d $ SRC] Then CD $ SRC If [-e "makefile. spec"] Then CP makefile. spec makefile. spec. orig # Build x86 Make clean Make For f in ./* Do If [-F $ F] & [-x $ F] Then Name = 'basename $ F' CP $ name $ {DST}/$ {name}-x86 Fi Done # Build MIPS-dynamic Make clean Sed-E's // (CC [[: Space:] * = [[: Space:] */) GCC // 1mipsel-dsag-linux-gnu-gcc/G' makefile. spec. orig> makefile. spec Make For f in ./* Do If [-F $ F] & [-x $ F] Then Name = 'basename $ F' CP $ name $ {DST}/$ {name}-MIPS-dy Fi Done # Build MIPS-static Make clean Sed-E's // (CC [[: Space:] * = [[: Space:] */) GCC // 1mipsel-dsag-linux-gnu-gcc-static/G' makefile. spec. orig> makefile. spec Make For f in ./* Do If [-F $ F] & [-x $ F] Then Name = 'basename $ F' CP $ name $ {DST}/$ {name}-MIPS-St Fi Done Make clean CP makefile. spec. orig makefile. spec Rm makefile. spec. orig Else Echo "there are no file/" makefile. spec/"for $ {app # [^.] *.}" Fi Else Echo "there are no source files for $ {app # [^.] *.}" Fi # Finally: Copy cmds file to destination Done CD $ home |