How to run SpecOMP on M5

build cross-compiler
1. download crosstool-0.43.tar.gz from
http://kegel.com/crosstool/#download
(http://kegel.com/crosstool/crosstool-0.43.tar.gz)
2. untar it
3. edit demo-alpha.sh
  3.1 RESULT_TOP="your_alpha_compiler"
  3.2 GCC_LANGUAGE="c,c++" --> GCC_LANGUAGE="c,c++,fortran"
  3.3 eval `cat ...dat ...dat` sh all.sh --> eval `cat alpha.dat
gcc-4.2.4-glibc-2.3.6-tls.dat` sh all.sh --notest
4. set gcc to gcc-3.4 instead of gcc-4.3 (when I use gcc-4.3 to build
the cross-compiler, there is a segmentation fault)
5. run demo-alpha.sh
6. there may be some errors (a header file (.h) missing " or some
things like that. You can modify the files directly and fix these
errors.
7. after you modify the files, you should change demo-alpha.sh again
  7.1 eval `cat alpha.dat gcc-4.2.4-glibc-2.3.6-tls.dat` sh all.sh
--notest --> eval `cat alpha.dat gcc-4.2.4-glibc-2.3.6-tls.dat` sh
all.sh --nounpack --notest
        --nounpack flag avoids downloading the source again to
overwrite you modification
8. get a new cross-compiler for alpha supports openmp

compile SpecOmp
because runspec may not work in M5, I compile the source directly
1. install specomp by following its document
2. change directory to benchspec
3. edit Makefile.defaults
  3.1 
LIBS=-Lyour_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/lib
  3.2 
CC=your_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc
  3.3 
CFLAGS=-Iyour_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/include
$(EXTRA_CFLAGS) $(PORTABILITY) $(CPORTABILITY) -fopenmp -O3
  3.4 
CXX=your_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc
  3.5 
FC=your_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gfortran
  3.6 
FFLAGS=-Iyour_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/include
$(EXTRA_FFLAGS) $(PORTABILITY) $(FPORTABILITY) -fopenmp -O3
  3.7 
F77FLAGS=-Iyour_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/include
$(EXTRA_FFLAGS) $(PORTABILITY) $(FPORTABILITY) -fopenmp -O3
  3.8 LD=$(CC) $(CFLAGS)
-Lyour_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/lib
-fopenmp -O3
 4. change directory to OMPM2001/3xx.xxxx/src (e.g., 320.equake/src)
 5. make and get the binary for alpha
 6. the list which can be compiled without error: wupwise, swim,
applu, equake, apsi, gafort (however, there is a segmentation fault
during execution), art, ammp

put files into images
1. copy all files and directories from
your_alpha_compiler/gcc-4.2.4-glibc-2.3.6/alpha-unknown-linux-gnu/alpha-unknown-linux-gnu/lib
to /lib of the linux image for M5 (e.g., linux-latest.img)
2. copy the executables and input files of SpecOmp to another image
and set it as the third disk image of M5

run specomp
1. run M5
2. mount the image containing the files of specomp
3. execute specomp executable with correspondent commands.

I am not very sure that I remember everything. However, the operation
flow may help others who want to do the same thing. If there is any
missing steps or mistakes, please correct me. And, I have a question.
How do I post this on the wiki or where should I post it?

Thank you all.

regards
  sitos



2009/2/10 nathan binkert <[email protected]>:
> By posting, I hope you're referring to a wiki page and not just an
> e-mail to the list.
>
> Thanks!
>
>  Nate
>
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to