[parsec-users] crosscompiling Parsec for SESC simulator

Joel Hestness hestness at cs.utexas.edu
Mon Sep 8 12:42:51 EDT 2008


Hi,
  Strangely enough, I was just writing a set of instructions for
crosscompiling for our research group.

  1. To start with, you will need a crosscompiler for the target ISA that
you are building for.  For instance, the M5 simulator has support to
simulate an alpha-linux machine, so you might want to crosscompile for
alpha-linux.  Dan Kegel provides a great tool for certain ISAs, called
crosstool, that builds crosscompilers http://www.kegel.com/crosstool/.  Use
of the tool should be very straightforward to get a crosscompiler built.
For more information on what the tool does or for building your own
crosscompiler from scratch, check out the "build matrix" link about halfway
down the page to see what versions of which software will work to build the
crosscompiler you need (it looks like SESC uses MIPS).  Of course, you could
use another crosscompile toolchain if you have access (the rest of these
instructions should still be applicable).

  2. It is probably the case that your binaries for the simulator will need
to be statically linked.  If you will be using gcc to crosscompile, you need
to add the '-static' flag to each gcc/g++ command that is called (which
might mean modifying your config/make files).  With PARSEC, you can also try
adding this flag to the 'bldconf' files

  3. Often, it will take some trial-and-error to build the application
because the make/configure commands do not always like that you are
crosscompiling.
   - Set your path to include the crosscompiler gcc:
        % setenv PATH /path/to/crosscompiler:${PATH}
     or
        % setenv PATH ${PATH}:/path/to/crosscompiler
     * You may need to try both of the combinations if ./configure does not
like that you are trying to crosscompile
     * To check if the crosscompiler-gcc is the default:
        % which gcc
        /path/to/crosscompiler/gcc
       Here, you can try compiling if you are using a standard 'make':
        % make
       * Sometimes this is all that is required to build
       * If you can make the necessary source/bldconf modifications and
get your PATH set up correctly, some of the PARSEC benchmarks can be built
in-situ using the ./bin/parsecmgmt script
   - If you are using a configure script, you might need to add flags to
specify the build, host and target machines.  For instance:
        % ./configure <old-flags> --build=i386-linux --target=alpha-linux
        % make
     * Try combinations of the flags to specify the build, host and target
machines. ./configure will usually tell you if the combination that you
tried is invalid.
     * If this does not work, try changing the order of your path as shown
above.
   - If the compilation completes, you should have a working, statically
linked binary to run in your simulator.

  Unfortunately, sometimes even this arduous path is not enough to get a
working binary for a simulator.  If the simulator does not implement all
system calls (as I would image is the case with SESC since it has a MIPS
emulator), your binaries might crash during execution due to an
unimplemented syscall.  To fix issues with syscalls, they either need to be
removed from the original application, or they need to be implemented in the
simulator.
  Further, PARSEC is in its early stages, and sometimes making sure that you
have crosscompiled/linked all of the libraries that a benchmark needs to
include can be difficult.  The information about which commands are executed
to build a particular PARSEC benchmark are printed to console when you
build it using the ./bin/parsecmgmt script, and these commands are
invaluable when you are unable to use this script to directly crosscompile.

  Hope this helps. Good luck,
  Joel Hestness
  Computer Architecture
  Dept. of Computer Science, University of Texas - Austin



On Mon, Sep 8, 2008 at 10:25 AM, Bushra Ahsan <ahsan_bushra at yahoo.com>wrote:

>   Hello,
>
> We just downloaded the parsec benchmarks. I was going through the archives
> and did not see cross compilation of parsec to run on the SESC simulator.
>
> Any help regarding compiling these benchmarks for SESC will be highly
> appreciated.
>
> Thanks in advance,
>
> Regards,
>
>
>
> Bushra Ahsan
> PhD Student
> Department of Electrical Engineering
> City College at City University of New York
>
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20080908/215222d6/attachment.htm>


More information about the parsec-users mailing list