Skip to content

3.how to use scripts

hyojongk edited this page Sep 9, 2019 · 2 revisions

Table of Contents generated with DocToc

How to launch a job

  • Add macsim/internal/tools to $PATH to use provided scripts easily.
  • run_batch.py will use bench_common.py and trace_common.py in the same directory.
  • Set $SIM_RESULT_DIR beforehand.

<path_to_run_batch_script> -bin <path_to_binary> -param <path_to_param> -suite <benchmark_suite> -dir <result_dir> -cmd <extra_args>

  • <path_to_run_batch_script>: path to run_batch.py script (e.g., /home/hkim606/sim/macsim/internal/tools/run_batch.py).
  • <path_to_binary>: path to macsim binary (e.g., /home/hkim606/sim/macsim/bin/macsim).
  • <path_to_param>: path to params.in file (e.g., /home/hkim606/sim/macsim/bin/params.in).
  • <benchmark_suite>: benchmark suite defined in bench_common.py (e.g, rodinia31-ver14 for PTX, spec06 for x86)
  • <result_dir>: $SIM_RESULT_DIR/<result_dir> will be created automatically by run_batch.py.
  • <extra_args>: These will overwrite those defined in params.in (e.g., 'max_insts=1000 --sim_cycle_count=100000'). Note that first argument must begin without double dash.

How to monitor jobs (For internal users only)

We use torque for launching and monitoring jobs. You can use torque tools such as pbsnodes, qsub, qdel, qstat, etc., but for ease of use, we provide

  • mypbsnodes script, which shows machine stats such as machine status and IDs of running jobs.
  • myqstat.py script, which shows job status, memory usage, etc. Plus, with this script, you can delete (kill) all of your jobs easily.

How to delete jobs (For internal users only)

To kill all of your jobs,

  • Do myqstat.py -killall

Warning: if you have an administrator permission, above command will also kill other people's jobs. To avoid this, you can do below:

  • myqstat.py | grep hyesoon | awk '{print $1}' | xargs qdel

How to analyze results

Suppose you submitted jobs using run_batch.py for rodinia31-ver14 benchmark suite.

  1. Go to $SIM_RESULT_DIR/<result_dir> (e.g., ~/macsim_results/sep9)
  2. Use get_data.py to analyze results.

<path_to_get_data_script> -suite <benchmark_suite> -dir <result_dir> -stat <stat_to_compute> <extra_args>

  • < path_to_get_data_script >: path to get_data.py script (e.g., /home/hkim606/sim/macsim/internal/tools/get_data.py).
  • <benchmark_suite>: benchmark suite defined in bench_common.py (e.g, rodinia31-ver14 for PTX, spec06 for x86)
  • <stat_to_compute>: can be of various forms
    • INST_COUNT_TOT
    • "ipc=INST_COUNT_TOT/CYC_COUNT_TOT"
    • etc.
  • <extra_args>
    • use -widenames to print full benchmark names.
    • use -prec to set precision (e,g., use 2 or 3 for IPC whereas for INST_COUNT_TOT use 0)
    • do get_data.py --help for more details.