2017-06-22 15:18:26 +02:00
|
|
|
using ArgParse
|
2017-06-08 20:09:27 +02:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Parsing command line
|
|
|
|
#
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
function parse_commandline()
|
|
|
|
settings = ArgParseSettings()
|
|
|
|
|
|
|
|
@add_arg_table settings begin
|
|
|
|
"--tol"
|
2017-09-10 16:20:36 +02:00
|
|
|
help = "set numerical tolerance for the SDP solver"
|
2017-06-08 20:09:27 +02:00
|
|
|
arg_type = Float64
|
2017-09-10 16:20:36 +02:00
|
|
|
default = 1e-14
|
2017-06-08 20:09:27 +02:00
|
|
|
"--iterations"
|
|
|
|
help = "set maximal number of iterations for the SDP solver (default: 20000)"
|
|
|
|
arg_type = Int
|
2017-11-05 20:43:35 +01:00
|
|
|
default = 60000
|
2017-06-08 20:09:27 +02:00
|
|
|
"--upper-bound"
|
2017-09-10 16:20:36 +02:00
|
|
|
help = "Set an upper bound for the spectral gap"
|
2017-06-08 20:09:27 +02:00
|
|
|
arg_type = Float64
|
|
|
|
default = Inf
|
|
|
|
"--cpus"
|
|
|
|
help = "Set number of cpus used by solver (default: auto)"
|
|
|
|
arg_type = Int
|
|
|
|
required = false
|
|
|
|
"-N"
|
2017-09-10 16:20:36 +02:00
|
|
|
help = "Consider automorphisms of free group on N generators"
|
2017-06-08 20:09:27 +02:00
|
|
|
arg_type = Int
|
|
|
|
default = 2
|
|
|
|
"--radius"
|
2017-09-10 16:20:36 +02:00
|
|
|
help = "Radius of ball B_r(e,S) to find solution over"
|
2017-06-08 20:09:27 +02:00
|
|
|
arg_type = Int
|
|
|
|
default = 2
|
2017-12-21 13:10:24 +01:00
|
|
|
"--warmstart"
|
|
|
|
help = "Use warmstart.jl as the initial guess for SCS"
|
2017-12-28 19:01:48 +01:00
|
|
|
action = :store_true
|
2017-06-08 20:09:27 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
return parse_args(settings)
|
|
|
|
end
|
|
|
|
|
2017-11-06 01:58:16 +01:00
|
|
|
parsed_args = parse_commandline()
|
2017-06-09 22:05:55 +02:00
|
|
|
|
2017-11-06 14:24:50 +01:00
|
|
|
include("CPUselect.jl")
|
2017-06-08 20:09:27 +02:00
|
|
|
|
2017-12-21 13:01:38 +01:00
|
|
|
set_parallel_mthread(parsed_args, workers=true)
|
2017-06-08 21:35:27 +02:00
|
|
|
|
2017-11-06 01:58:16 +01:00
|
|
|
include("SAutFNs.jl")
|
|
|
|
include("Orbit.jl")
|
2017-11-06 14:24:50 +01:00
|
|
|
|
2017-11-06 01:58:16 +01:00
|
|
|
main(SAutFNs, parsed_args)
|