Skip to content
Snippets Groups Projects
Commit 60dd15a9 authored by erwan's avatar erwan
Browse files

simca: fix the script that were broken since 2bf88c0d

add a  test sin the CI  to make sure I  don't miss simca break  in the
future ! (I was only testing simca using the docker version of sasa).
parent 28718a32
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,10 @@ build:
- make
- make install
- make test
- cd tools/simca
- make && make cmxs && make log -j 15 && make pdf
simca:
simca-docker:
image: jahierwan/verimag-sync-tools
stage: release
script:
......@@ -27,7 +29,7 @@ simca:
paths:
- tools/simca
test_opam_test:
stage: release
script:
......
#use "genExpeMakefiles.ml";;
precision := 0.1;;
(* 0.01 means that we simulate until the Confidence Interval
size of the 3 complexity numbers under estimation is smaller
than 1% of their current estimation.
*)
let algos = ["../../test/alea-coloring-alt";
"../../test/alea-coloring-unif";
"../../test/alea-coloring"]
let daemons = ["-sd";"-lcd";"-dd"]
(* let cliques = List.init 25 (fun n -> Clique (20*(n+1))) (* [20; 40; ...; 500] *) *)
(* let rings = List.init 25 (fun n -> Ring (400*(n+1))) (* [400; 800; ...; 10000] *) *)
(* let er = List.init 25 (fun n -> ER (10*(n+1), 0.4)) (* [10; 20; ...; 250] *) *)
let rings = List.init 10 (fun n -> Ring (500*(n+1))) (* [500; 1000; ...; 5000] *)
let cliques = List.init 10 (fun n -> Clique (30*(n+1))) (* [30; 60; ...; 300] *)
let er = List.init 10 (fun n -> ER (30*(n+1), 0.4)) (* [30; 60; ...; 300] *)
let networks = (cliques@rings@er)
let gen_make_rules () = gen_makefile "Makefile.expe-rules" daemons algos networks;;
#use "parseLog.ml";;
let gen_pdf () =
let gl = ["clique"; "ring"; "er"] in
List.iter (fun n -> sh ("rm -f "^n^".data")) gl;
parse_log ["Col-a1","alea-coloring-unif"] gl daemons;
parse_log ["Col-a2","alea-coloring"] gl daemons;
parse_log ["Col-a3","alea-coloring-alt"] gl daemons;
List.iter (fun n -> sh ("./gen_pdf_paper.r "^n^".data coloring4zpaper")) gl;
List.iter (fun n -> sh ("./gen_pdf.r "^n^".data coloring")) gl
......@@ -72,7 +72,7 @@ let (gen_dot_rule : out_channel -> graph -> daemon list -> dir list ->
let log = Printf.sprintf "%s%s-%s.log" name d bdir in
Printf.fprintf oc
"\t && echo \"#use \\\"%s/runSimus.ml\\\";;\\n \\
run_simus %b %f %d %d.0 \\\"sasa -l 20000 %s %s -nd > /dev/null\\\";;\\n\" \\
run_simus %b %f %d %d.0 \\\"sasa -l 20000 %s %s -nd \\\";;\\n\" \\
| ocaml > %s/%s \\
"
cwd regen_dot !precision !max_simu_nb !timeout_in_sec dot d cwd log
......
......@@ -114,10 +114,17 @@ let run_simus regen_dot threshold max_simu_nb timeout cmd =
assert (0 = Sys.command gen_dot_cmd)
);
let l = run cmd in
List.iter
if (l=[]) then (
Printf.printf "The cmd '%s' returned nothing! \n%!" cmd;
exit 2
);
let l = List.filter
(fun str -> String.length str > 11 && String.sub str 0 10 = "This algo ") l
in
List.iter
(fun x ->
match get_step x with
| None -> ()
| None -> Printf.printf "get_step fail. Maybe the graph is not connected? start again..=\n"
(* can occur if the generated graph is not connected on some algos *)
| Some (m,s,r) ->
incr i;
......
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