diff --git a/compile_revision.sh b/compile_revision.sh index 3f1eb68..0e4299b 100755 --- a/compile_revision.sh +++ b/compile_revision.sh @@ -1,84 +1,82 @@ #!/usr/bin/bash set -euo pipefail akantu_src=$1 test_src=$2 revision=$3 usage() { echo "$0 " } if [ -z ${akantu_src} ]; then usage exit 1 fi if [ ! -e ${test_src} -o -z ${test_src} ]; then usage exit 2 fi wd=${PWD} prefix=$(mktemp --directory akantu.XXXXXXX --tmpdir) cd ${prefix} git clone ${akantu_src} -n akantu cd akantu git checkout ${revision} revision_date=$(git log -1 --format='%ct') cd ${prefix}/akantu mkdir build cd build echo "*** Configuring revision r${revision} ***" -cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_FLAGS:STRING='-march=native' -DAKANTU_DEBUG:BOOL=OFF .. > ${wd}/configure-akantu-${revision}.log 2>&1 +cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_FLAGS:STRING='-march=native' -DAKANTU_DEBUG:BOOL=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=TRUE .. > ${wd}/configure-akantu-${revision}.log 2>&1 if [ ! $? -eq 0 ]; then exit 100 fi make_opts="" if [ x"SLURM_CPUS_PER_TASK" != "x" ]; then make_opts="-j ${SLURM_CPUS_PER_TASK}" fi echo "*** Building revision r${revision} ***" make ${make_opts} > ${wd}/make-akantu-${revision} 2>&1 if [ ! $? -eq 0 ]; then exit 200 fi - mkdir ${prefix}/build cd ${prefix}/build - # 1413714847 epoch of tag v2.2 -if [ $revision -lt 1413714847 ]; then +if [ "${revision_date}" -lt 1413714847 ]; then echo "MAJOR 1" VERSION=1 else echo "MAJOR 2" VERSION=2 fi echo "*** Configuring test for r${revision} ***" cmake -DAKANTU_VERSION_MAJOR:STRING=$VERSION -DAkantu_DIR:PATH=${prefix}/akantu/build ${test_src} > ${wd}/configure-test-${revision} 2>&1 if [ ! $? -eq 0 ]; then exit 300 fi echo "*** Building test for r${revision} ***" make > ${wd}/make-test-${revision} 2>&1 if [ ! $? -eq 0 ]; then exit 400 fi cp perf_test ${wd} diff --git a/createJobs.py b/createJobs.py index 1c2690f..d8cdf0b 100644 --- a/createJobs.py +++ b/createJobs.py @@ -1,19 +1,17 @@ import git def createJobs(base): - # create of job template object job = base.Job() - repo = git.Repo.init('/home/richart/akantu-bare', bare=True) commits = repo.iter_commits() # specify a range of jobs job["revision"] = [c.hexsha for c in commits] job["ntasks"] = [1] # creation of the jobs on the database n_insertion = base.createParameterSpace(job) return n_insertion diff --git a/launch.sh b/launch.sh index 8ab4626..a844911 100644 --- a/launch.sh +++ b/launch.sh @@ -1,47 +1,47 @@ #!/bin/bash module load $(echo "__BLACKDYNAMITE__modules_list__" | tr "[,\[\]']" " ") bash ./compile_revision.sh __BLACKDYNAMITE__akantu_url__ __BLACKDYNAMITE__source_path__ __BLACKDYNAMITE__revision__ res=$? failure="FAILURE" case $res in 100) failure="FAIL_CONFIG_AKANTU" ;; 200) failure="FAIL_MAKE_AKANTU" ;; 300) failure="FAIL_CONFIG_TEST" ;; 400) failure="FAIL_MAKE_TEST" ;; esac if [ ! $res -eq 0 ]; then updateRuns.py --updates "state = ${failure}" --truerun exit $res fi ./perf_test | tee times.out res=$? if [ ! $res -eq 0 ]; then updateRuns.py --updates "state = FAIL_TO_RUN" --truerun exit $res fi while IFS= read -r line; do id=$(echo "$line" | awk '{ print $1 }') time=$(echo "$line" | awk '{ print $2 }') nb=$(echo "$line" | awk '{ print $3 }') - echo "pushQuantity.py --quantity_id time_${id} --values ${time} --is_float 1 --truerun" - echo "pushQuantity.py --quantity_id nb_${id} --values ${nb} --is_float 1 --truerun" + pushQuantity.py --quantity_id time_${id} --values ${time} --is_float --truerun + pushQuantity.py --quantity_id nb_${id} --values ${nb} --is_float --truerun done < <(cat times.out | grep ' + ' | sed 's/ + \(.*\)\s*:\s*\([0-9.]*\)us - .*: \([0-9]*\)/\1 \2 \3/') updateRuns.py --updates "state = FINISHED" --truerun