Skip to content

Commit

Permalink
Added support to launch multiple experiements in parallel when local=1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Bera committed Aug 24, 2022
1 parent e1048d7 commit 0bf777f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The additional arguments of the scripts are:
| Argument | Description | Default |
| -------- | ----------- | --------------|
| `local` | Set to 0 (or 1) to generate commandlines to run in slurm cluster (or in local machine). | 0 |
| `num_parallel` | Number of experiements to run in parallel when in local mode. Not useful in slurm mode. | 8 |
| `ncores` | Number of cores requested by each slurm job to slurm controller. Typically set to 1, as ChampSim is inherently a single-threaded simulator. | 1 |
| `partition` | Default slurm partition name. | `slurm_part` |
| `hostname` | Default slurm machine hostname. | `kratos` |
Expand Down
9 changes: 9 additions & 0 deletions scripts/create_jobfile.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
my $exp_file;
my $exe;
my $local = "0";
my $num_parallel = 8;
my $ncores = 1;
my $slurm_partition = "slurm_part";
my $hostname = "kratos";
Expand All @@ -22,6 +23,7 @@
'exe=s' => \$exe,
'ncores=s' => \$ncores,
'local=s' => \$local,
'num_parallel=s' => \$num_parallel,
'partition=s' => \$slurm_partition,
'hostname=s' => \$hostname,
'exclude=s' => \$exclude_list,
Expand Down Expand Up @@ -84,6 +86,8 @@
print "#\n";
print "#\n";

my $count = 0;

foreach $trace (@trace_info)
{
foreach $exp (@exp_info)
Expand All @@ -98,6 +102,11 @@
if($local)
{
$cmdline = "$exe $exp_knobs $trace_knobs -traces $trace_input > ${trace_name}_${exp_name}.out 2>&1";
$count++;
if($count % $num_parallel)
{
$cmdline = $cmdline . ' &';
}
}
else
{
Expand Down

0 comments on commit 0bf777f

Please sign in to comment.