Test running sbatch command
This commit is contained in:
@@ -5,6 +5,8 @@ extern crate yaml_rust;
|
||||
use benchmark_repository::BenchmarkRepository;
|
||||
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
use yaml_rust::YamlLoader;
|
||||
|
||||
fn main()
|
||||
@@ -19,6 +21,8 @@ fn main()
|
||||
let content = benchmark_repository.read_file(Path::new("instances.yml"), "config").unwrap();
|
||||
let instances = &YamlLoader::load_from_str(&content).unwrap()[0];
|
||||
|
||||
let mut i = 0;
|
||||
|
||||
for configuration in configurations.as_vec().unwrap()
|
||||
{
|
||||
for (instance_set_id, instance_set) in instances.as_hash().unwrap()
|
||||
@@ -40,8 +44,33 @@ fn main()
|
||||
continue;
|
||||
}
|
||||
|
||||
println!("to do: [{}, {}, {}/{}/{}]", configuration_id, instance_set_id, instance_ipc, instance_domain, instance_number);
|
||||
let branch_name = benchmark_repository.create_branch_for_job(i);
|
||||
|
||||
Command::new("sbatch")
|
||||
.args(&["/home/pluehne/test-job.sh"])
|
||||
.env("JOB_BRANCH_NAME", &branch_name)
|
||||
.output()
|
||||
.expect("Could not execute command");
|
||||
|
||||
i += 1;
|
||||
|
||||
if i > 10
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if i > 10
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if i > 10
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
benchmark_repository.join();
|
||||
}
|
||||
|
Reference in New Issue
Block a user