remove ArgParse
This commit is contained in:
parent
1468986b4a
commit
1b98997815
44
Orb_AutFN.jl
44
Orb_AutFN.jl
@ -108,50 +108,6 @@ function reconstructP(m::JuMP.Model, data::ProblemData)
|
||||
return sum(data.dims[π]*data.Us[π]*computedPs[π]*data.Us[π]' for π in 1:endof(data.Ps))
|
||||
end
|
||||
|
||||
function cpuinfo_physicalcores()
|
||||
maxcore = -1
|
||||
for line in eachline("/proc/cpuinfo")
|
||||
if startswith(line, "core id")
|
||||
maxcore = max(maxcore, parse(Int, split(line, ':')[2]))
|
||||
end
|
||||
end
|
||||
maxcore < 0 && error("failure to read core ids from /proc/cpuinfo")
|
||||
return maxcore + 1
|
||||
end
|
||||
|
||||
function parse_commandline()
|
||||
s = ArgParseSettings()
|
||||
|
||||
@add_arg_table s begin
|
||||
"--tol"
|
||||
help = "set numerical tolerance for the SDP solver (default: 1e-5)"
|
||||
arg_type = Float64
|
||||
default = 1e-5
|
||||
"--iterations"
|
||||
help = "set maximal number of iterations for the SDP solver (default: 20000)"
|
||||
arg_type = Int
|
||||
default = 20000
|
||||
"--upper-bound"
|
||||
help = "Set an upper bound for the spectral gap (default: Inf)"
|
||||
arg_type = Float64
|
||||
default = Inf
|
||||
"--cpus"
|
||||
help = "Set number of cpus used by solver (default: auto)"
|
||||
arg_type = Int
|
||||
required = false
|
||||
"-N"
|
||||
help = "Consider automorphisms of free group on N generators (default: N=2)"
|
||||
arg_type = Int
|
||||
default = 2
|
||||
"--radius"
|
||||
help = "Find the decomposition over B_r(e,S)"
|
||||
arg_type = Int
|
||||
default = 2
|
||||
end
|
||||
|
||||
return parse_args(s)
|
||||
end
|
||||
|
||||
function create_SDP_problem(name::String; upper_bound=Inf)
|
||||
info(PropertyT.logger, "Loading data....")
|
||||
t = @timed SDP_problem, orb_data = init_ProblemData(name);
|
||||
|
Loading…
Reference in New Issue
Block a user