Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 03146198 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

benchs: database scalfmm.sqlite3 must be updated serially

parent b6d6ba44
No related branches found
No related tags found
No related merge requests found
Pipeline #1130957 passed
......@@ -98,6 +98,19 @@ benchmark:
when: always
paths:
- ./*.log
- ./*.csv
- ./scripts/results/
database:
stage: deploy
tags: ['plafrim']
#extends: .only-main-mr
needs: ['benchmark']
script:
- ./scripts/database.sh
artifacts:
when: always
paths:
- ./*.sqlite3
- ./*.csv
......
#!/usr/bin/env bash
set -ex
# get current database file scalfmm.sqlite3 stored on gitlab
if [[ ! -z "${CI_JOB_TOKEN}" ]]; then
export PACKAGEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages" |jq '.[0].id'`
if [[ "${PACKAGEID}" != "null" ]]; then
export FILEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files" |jq '.[0].id'`
if [[ "${FILEID}" != "null" ]]; then
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/generic/benchmark/latest/scalfmm.sqlite3" -o scalfmm.sqlite3
fi
fi
fi
# update scalfmm.sqlite3 database, tables : accuracy, timeseq, timeomp
jube result scripts/results --id 1 -o accuracy
jube result scripts/results --id 2 -o timeseq
jube result scripts/results --id 3 -o timeomp
# upload updated scalfmm.sqlite3 on gitlab
if [[ ! -z "${CI_JOB_TOKEN}" ]]; then
# get package id of the database stored on gitlab
export PACKAGEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages" |jq '.[0].id'`
if [[ "${PACKAGEID}" != "null" ]]; then
# get file id of the database on gitlab
export FILEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files" |jq '.[0].id'`
if [[ "${FILEID}" != "null" ]]; then
# delete previous database version on gitlab if exists
curl --request DELETE --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files/$FILEID"
fi
fi
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./scalfmm.sqlite3 "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/generic/benchmark/latest/scalfmm.sqlite3"
fi
# send results to the elasticsearch server
#ls guix.json
#python3 script/add_result.py -e https://elasticsearch.bordeaux.inria.fr -t concace -p "scalfmm" scalfmm.csv
......@@ -25,17 +25,6 @@ if [ -d scripts/results ]; then
rm scripts/results -r
fi
# get current database file scalfmm.sqlite3 stored on gitlab
if [[ ! -z "${CI_JOB_TOKEN}" ]]; then
export PACKAGEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages" |jq '.[0].id'`
if [[ "${PACKAGEID}" != "null" ]]; then
export FILEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files" |jq '.[0].id'`
if [[ "${FILEID}" != "null" ]]; then
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/generic/benchmark/latest/scalfmm.sqlite3" -o scalfmm.sqlite3
fi
fi
fi
# configuration
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -march=native" -Dscalfmm_BUILD_BENCH=ON -Dscalfmm_USE_MKL=ON
......@@ -53,7 +42,7 @@ case "${CI_BENCHMARK}" in
jube result scripts/results --id 1 -o accuracy_csv > scalfmm_accuracy.csv
cat scalfmm_accuracy.csv
# update scalfmm.sqlite3 database, table accuracy
jube result scripts/results --id 1 -o accuracy
#jube result scripts/results --id 1 -o accuracy
;;
timeseq)
echo "CI_BENCHMARK is set to timeseq."
......@@ -62,7 +51,7 @@ case "${CI_BENCHMARK}" in
jube analyse scripts/results --id 2
jube result scripts/results --id 2 -o timeseq_csv > scalfmm_timeseq.csv
cat scalfmm_timeseq.csv
jube result scripts/results --id 2 -o timeseq
#jube result scripts/results --id 2 -o timeseq
;;
timeomp)
echo "CI_BENCHMARK is set to timeomp."
......@@ -71,29 +60,10 @@ case "${CI_BENCHMARK}" in
jube analyse scripts/results --id 3
jube result scripts/results --id 3 -o timeomp_csv > scalfmm_timeomp.csv
cat scalfmm_timeomp.csv
jube result scripts/results --id 3 -o timeomp
#jube result scripts/results --id 3 -o timeomp
;;
*)
echo "CI_BENCHMARK is set to an unknown value."
exit 1
;;
esac
# upload updated scalfmm.sqlite3 on gitlab
if [[ ! -z "${CI_JOB_TOKEN}" ]]; then
# get package id of the database stored on gitlab
export PACKAGEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages" |jq '.[0].id'`
if [[ "${PACKAGEID}" != "null" ]]; then
# get file id of the database on gitlab
export FILEID=`curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files" |jq '.[0].id'`
if [[ "${FILEID}" != "null" ]]; then
# delete previous database version on gitlab if exists
curl --request DELETE --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/$PACKAGEID/package_files/$FILEID"
fi
fi
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./scalfmm.sqlite3 "https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/packages/generic/benchmark/latest/scalfmm.sqlite3"
fi
# send results to the elasticsearch server
#ls guix.json
#python3 script/add_result.py -e https://elasticsearch.bordeaux.inria.fr -t concace -p "scalfmm" scalfmm.csv
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment