Automatically Running Simulations using gen-scripts

The Multifacet project uses extensive scripting to automate simulations. Our scripts generate shell scripts to run simulations interactively and we generate files used by our grid computing system called [http://www.cs.wisc.edu/condor Condor]. We included several of these to serve as starting points for your environment (however Condor functionality has been removed). In the $GEMS/gen-scripts directory, you will find some files of interest:

gen-scripts.py

workloads.py

mfacet.py

Example of gen-scripts

  1. First build a protocol as described in QuickStart. For this example, it is assumed that the MOSI_SMP_bcast protocol has been built.

  2. Edit $GEMS/gen-scripts/gen-scripts.py and specify the protocol and the number of processors
    •     modules_list.append("MOSI_SMP_bcast")
          processor_list.append(16)
  3. Edit $GEMS/gen-scripts/workloads.py to choose which checkpoints/workloads you wish to run. In this file, you will see several sets of workloads. For example, consider the following:
    •     test_runs = [
             ("jbb/jbb_warm",             "jbb",        100, 1, 500, None),
             ("oltp/oltp_warm",           "oltp",         2, 1, 500, None),
             ("apache/apache_warm",       "apache",       8, 1, 500, None),
             ("zeus/zeus_warm",           "zeus",         8, 1, 500, None),
            ]

      Four workloads are specified in this set. Each one corresponds to .check files in the $GEMS/simics/checkpoints-u3 directory. For example, "jbb/jbb_warm" corresponds to a $GEMS/simics/checkpoints-u3/jbb/jbb_warm-16p.check" file. These files do not exist in the release because we cannot distribute workloads due to licensing issues. To generate scripts to run this set of workloads, set the following variable in workloads.py:

          workload_list += test_runs
      Other runtime variables are also located in this file such as PROCS_PER_CHIP and NUM_L2_BANKS. There is a tight relationship between the specifications in gen-scripts.py and workloads.py, and we encourage you to examine the code to understand this and modify them to suit your needs.
  4. Generate shell-scripts by running gen-scripts.py
    •     ./gen-scripts.py
  5. Interactively run the simulation
    •     cd ../results/scripts
          ./jbb_100_MOSI_SMP_bcast_default_16_10000.sh
  6. Look at the statistics dumped in the results directory
    •     cd ../results/jbb_100
          vi jbb_100-16p-default-MOSI_SMP_bcast-10000.stats
      The .stats file is the output from Ruby. Some statistics of interest might be Ruby_cycles (the runtime of the simulation), L1D_cache_total_misses, and L2_cache_total_misses.

gen-scripts (last edited 2005-02-27 18:26:18 by MikeMarty)