Commit c8ee5f10 authored by erwan's avatar erwan
Browse files

Add a new artifact: the coloring campaign

parent b41a7baa
Pipeline #44960 passed with stages
in 244 minutes
......@@ -45,7 +45,26 @@ expe-dockver:
artifacts:
paths:
- expe/results
coloring:
image: ocaml/opam2:ubuntu
stage: test
script:
- opam depext -y sasa
- opam install -y sasa
- cd coloring-campaign
- git clone https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa.git
- cp coloring_campaign.ml sasa/tools/simca/
- cp Makefile sasa/tools/simca/
- cd sasa/tools/simca
- make
- make cmxs
- make log -j 10
artifacts:
paths:
- coloring-campaign/sasa/tools/simca/
pages:
stage: deploy
before_script:
......
......@@ -3,7 +3,7 @@
* Artifact of the article *SASA: a SimulAtor of Self-stabilizing Algorithms* published in TAP 2020
The objective of this artifact is to show how to replicate the
experiments mentioned in [[file:sasarticle.pdf][this article]].
experiments mentioned in [[https://hal-cnrs.archives-ouvertes.fr/hal-02521149][this article]].
https://doi.org/10.5281/zenodo.3751283
......
CAMPAIGN=coloring_campaign.ml
Makefile.expe-rules: $(CAMPAIGN)
echo "#use \"$(CAMPAIGN)\";;\n gen_make_rules ();;" | ocaml
-include Makefile.expe-rules
# CMXS and LOG are defined in Makefile.expe-rules, which must have been generated!
cmxs: $(CMXS)
log: $(LOG)
pdf:
echo "#use \"$(CAMPAIGN)\";;\n gen_pdf ();;" | ocaml
clean:
rm -rf *.log *.data *.pdf Makefile.expe-rules *~ *.png cmxs_done
.PRECIOUS: .sh
#use "genExpeMakefiles.ml";;
precision := 0.1;;
(* 0.1 means that we simulate until the Confidence Interval
size of the 3 complexity numbers under estimation is smaller
than 10% of their current estimation.
*)
let algos = ["../../test/alea-coloring-alt";
"../../test/alea-coloring-unif";
"../../test/alea-coloring"]
let daemons = ["-sd";"-lcd";"-dd"]
let daemons = ["-sd"; "-lcd"; "-dd"]
let cliques = List.init 10 (fun n -> Clique (30*(n+1))) (* Cliques of size 30, 60, ..., 300 *)
let er = List.init 10 (fun n -> ER (30*(n+1), 0.4)) (* ER of size 30, 60, ..., 300 *)
let rings = List.init 10 (fun n -> Ring (500*(n+1))) (* Rings of size 500, 1000, ..., 5000 *)
let gen_make_rules () =
let fn = "Makefile.expe-rules" in
let oc = open_out fn in
Printf.fprintf oc "# Generated by coloring_campaign.ml";
let compare_neg x y = compare y x in
let l = List.sort_uniq compare_neg (cliques @ rings @ er) in
let targets,targets_cmxs = gen_makefile oc daemons algos l [] [] in
Printf.fprintf oc "\nCMXS=%s\n" (String.concat " " targets_cmxs);
Printf.fprintf oc "\nLOG=%s\n%!" (String.concat " " targets);
Printf.printf "%s has been generated\n%!" fn;
close_out oc
;;
#use "parseLog.ml";;
let gen_pdf () =
let gl = ["clique"; "ring"; "er"] in
List.iter (fun n -> sh ("rm -f "^n^".data")) gl;
parse_log ["Uniform When Activated","alea-coloring-unif"] gl daemons;
parse_log ["Smallest When Activated","alea-coloring"] gl daemons;
parse_log ["Always the Biggest","alea-coloring-alt"] gl daemons;
List.iter (fun n -> sh ("./gen_pdf_paper.r "^n^".data coloring")) gl;
()
;;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment