-
Notifications
You must be signed in to change notification settings - Fork 6
/
run.jl
59 lines (51 loc) · 1.31 KB
/
run.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
if Base.current_project() != joinpath(@__DIR__, "Project.toml") || (get(ENV, "CI", nothing) == "true")
@info "Activating simulation environment"
using Pkg
Pkg.activate(@__DIR__)
@info "Instantiating environment"
Pkg.instantiate()
end
using Distributed
@everywhere begin
using Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()
end
@info "Loading simulation framework"
@everywhere begin
using Crispulator
using ArgParse
using DataFrames
using Distributions
using DataStructures
using CSV
using Gadfly
using YAML
using ProgressMeter
end
include("parsing.jl")
include("commands.jl")
function main()
parsed_args = parse_args(build_arg_table())
command = parsed_args["%COMMAND%"]
if command == "ls"
foreach(x -> println(x), ls())
elseif command == "exp"
bootstrap_exp(
parsed_args[command]["analysis_file"],
parsed_args[command]["output_file"],
parsed_args[command]["addprocs"],
parsed_args[command]["debug"]
)
else
bootstrap_config(
parsed_args[command]["config_file"],
parsed_args[command]["output_dir"],
parsed_args[command]["no-graph"]
)
end
end
# fire up simulation if run using command line
if !isinteractive()
main()
end