Introduce job keys
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
tmp_dir=/home/pluehne/tmp
|
||||
|
||||
echo "job ID: $JOB_ID"
|
||||
echo "result repository: $JOB_RESULT_REPOSITORY_URL"
|
||||
echo "job key: $JOB_KEY"
|
||||
echo "job result repository URL: $JOB_RESULT_REPOSITORY_URL"
|
||||
|
||||
mkdir -p "$tmp_dir"
|
||||
dir="$tmp_dir"/"job-$JOB_ID"
|
||||
@@ -27,10 +28,10 @@ pushd "$dir"
|
||||
git config user.name "Potassco Bot"
|
||||
git config user.email "bot@potassco.org"
|
||||
|
||||
echo "start of benchmark output of job $JOB_ID" > test-output
|
||||
echo "start of benchmark output of job $JOB_KEY" > test-output
|
||||
sleep 10
|
||||
start_time=$(date +%s%N)
|
||||
echo "end of benchmark output of job $JOB_ID" >> test-output
|
||||
echo "end of benchmark output of job $JOB_KEY" >> test-output
|
||||
git add test-output
|
||||
git commit -m "Test update"
|
||||
git push
|
||||
|
@@ -36,8 +36,8 @@ fn main()
|
||||
let instance_domain = instance["domain"].as_str().unwrap();
|
||||
let instance_number = instance["instance"].as_i64().unwrap();
|
||||
|
||||
let file_name_base = format!("{}/{}/{}/{}", configuration_id, instance_ipc, instance_domain, instance_number);
|
||||
let file_name_output = format!("{}.out", file_name_base);
|
||||
let job_key = format!("{}/{}/{}/{}", configuration_id, instance_ipc, instance_domain, instance_number);
|
||||
let file_name_output = format!("{}.out", job_key);
|
||||
|
||||
if benchmark_repository.file_exists(Path::new(&file_name_output), "results")
|
||||
{
|
||||
@@ -45,12 +45,13 @@ fn main()
|
||||
continue;
|
||||
}
|
||||
|
||||
let job = benchmark_repository.create_result_repository();
|
||||
let job = benchmark_repository.create_job(job_key);
|
||||
|
||||
Command::new("sbatch")
|
||||
.args(&["/home/pluehne/test-job.sh", "--nodes", "1", "--ntasks-per-node", "1", "-p", "kr"])
|
||||
.env("JOB_RESULT_REPOSITORY_URL", &format!("file://{}", fs::canonicalize(&job.result_repository_path).unwrap().display()))
|
||||
.env("JOB_ID", format!("{}", job.id))
|
||||
.env("JOB_KEY", format!("{}", job.key))
|
||||
.output()
|
||||
.expect("Could not execute command");
|
||||
|
||||
|
Reference in New Issue
Block a user