diff --git a/bd.yaml b/bd.yaml new file mode 100644 index 0000000..a1c40f0 --- /dev/null +++ b/bd.yaml @@ -0,0 +1,20 @@ +--- + +study: perftestakantu + +job: + revision: str + +run: + compiler_version: str + +job_space: ./createJobs.py + +run_space: + compiler: gcc-12 + +config_files: + - compile_revision.sh + +exec_file: launch.sh + diff --git a/compile_revision.sh b/compile_revision.sh new file mode 100644 index 0000000..567ea65 --- /dev/null +++ b/compile_revision.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +akantu_src=$1 +test_src=$2 +revision=$3 + +usage() { + echo $1 +} + +if [ ! -e ${akantu_src} -o -z ${akantu_src} ]; then + usage(); + exit 1 +fi + +if [ ! -e ${test_src} -o -z ${test_src} ]; then + usage(); + exit 2 +fi + +cd ${akantu_src} +git checkout ${revision} + +revision_date=$(git log -1 --format='%ct') + +mkdir build-${revision} +cd build-${revision} + + +echo "*** Configuring revision r${revision} ***" +cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILE_FLAGS:STRING='-march=native' -DAKANTU_DEBUG:BOOL=OFF ${akantu_src} > configure.log 2>&1 + +if [ ! $? -eq 0 ]; then + exit 100 +fi + +echo "*** Building revision r${revision} ***" +make > make.log 2>&1 + +if [ ! $? -eq 0 ]; then + exit 200 +fi + +cd ${test_src} +mkdir build-${revision} +cd build-${revision} + + +# 1413714847 epoch of tag v2.2 +if [ $revision -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=${akantu_src}/buidl-${revision} ${test_src} > configure.log 2>&1 + +if [ ! $? -eq 0 ]; then + exit 300 +fi + +echo "*** Building test for r${revision} ***" +make > make.log 2>&1 + +if [ ! $? -eq 0 ]; then + exit 400 +fi diff --git a/createJobs.py b/createJobs.py new file mode 100644 index 0000000..9a775f0 --- /dev/null +++ b/createJobs.py @@ -0,0 +1,12 @@ + +def createJobs(base): + + # create of job template object + job = base.Job() + + # specify a range of jobs + job["revision"] = 1 + + # creation of the jobs on the database + n_insertion = base.createParameterSpace(job) + print(f"Inserted {n_insertion} new jobs") diff --git a/launch.sh b/launch.sh new file mode 100644 index 0000000..2cd9af5 --- /dev/null +++ b/launch.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo 'here is the job' +echo __BLACKDYNAMITE__revision__ +echo __BLACKDYNAMITE__revision_url__ +echo __BLACKDYNAMITE__host__ + +bash ./compile_revision.sh