From 43ae0a3068de8dbfa8c1ae421e8e046a21f84ab4 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Thu, 9 Jun 2022 09:09:32 +0200 Subject: [PATCH] cleanup and documented --- .ipr/{launch-perf-jobs.sh => hibench-on-physix.sh} | 8 ++++---- .ipr/{hibench.job => starbench-template.job} | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) rename .ipr/{launch-perf-jobs.sh => hibench-on-physix.sh} (94%) rename .ipr/{hibench.job => starbench-template.job} (93%) diff --git a/.ipr/launch-perf-jobs.sh b/.ipr/hibench-on-physix.sh similarity index 94% rename from .ipr/launch-perf-jobs.sh rename to .ipr/hibench-on-physix.sh index 81aadb7..778b3ae 100755 --- a/.ipr/launch-perf-jobs.sh +++ b/.ipr/hibench-on-physix.sh @@ -187,9 +187,9 @@ function launch_job_for_host_group() ;; esac - # cat $SCRIPT_DIR/hibench.job | sed "s~~$(cat $SCRIPT_DIR/starbench.py)~" > /tmp/hibench.job - cat $SCRIPT_DIR/hibench.job | substitute_TAG_with_FILEcontents '' "$SCRIPT_DIR/starbench.py" > /tmp/hibench.job - chmod a+x /tmp/hibench.job + local starbench_job_path='/tmp/starbench.job' + cat $SCRIPT_DIR/starbench-template.job | substitute_TAG_with_FILEcontents '' "$SCRIPT_DIR/starbench.py" > "${starbench_job_path}" + chmod a+x "${starbench_job_path}" local hibench_root_dir="$GLOBAL_WORK_DIR/graffy/hibridon/benchmarks/starbench" mkdir -p "${hibench_root_dir}" @@ -197,7 +197,7 @@ function launch_job_for_host_group() local this_bench_dir="${hibench_root_dir}/${hibridon_version}/${benchmark_test}/${host_group_id}/${compiler_id}" mkdir -p "${this_bench_dir}" - command="/tmp/hibench.job \"${git_repos_url}\" \"${git_user}\" \"${git_pass_file}\" \"${hibridon_version}\" \"${cmake_options}\" \"${benchmark_command}\" \"${env_vars_bash_commands}\"" + command="${starbench_job_path} \"${git_repos_url}\" \"${git_user}\" \"${git_pass_file}\" \"${hibridon_version}\" \"${cmake_options}\" \"${benchmark_command}\" \"${env_vars_bash_commands}\"" echo "command = $command" # eval $command diff --git a/.ipr/hibench.job b/.ipr/starbench-template.job similarity index 93% rename from .ipr/hibench.job rename to .ipr/starbench-template.job index 6538129..07d79fd 100644 --- a/.ipr/hibench.job +++ b/.ipr/starbench-template.job @@ -1,6 +1,5 @@ #!/usr/bin/env bash -# this job file is a template file used by launch-perf-jobs.sh - +# this job file is a template file for starbench jobs git_repos_url="$1" # eg "https://github.com/hibridon/hibridon" git_user="$2" # eg 'g-raffy' git_pass_file="$3" # eg "$HOME/.github/personal_access_tokens/bench.hibridon.cluster.ipr.univ-rennes1.fr.pat" @@ -34,11 +33,13 @@ then fi mkdir -p "${temp_dir}" +# extract starbench.py from this job script starbench_path="${temp_dir}/starbench.py" output_dir="${temp_dir}" num_cores=${NSLOTS} +# the starbench.py code is expected to be included in the job script as a replacement of the tag cat <<-'EOF' > "${starbench_path}" EOF