diff --git a/AutFN.jl b/AutFN.jl index 9abf543..436c33a 100644 --- a/AutFN.jl +++ b/AutFN.jl @@ -38,17 +38,6 @@ 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() @@ -86,14 +75,9 @@ function parse_commandline() end function main() +include("CPUselect.jl") +set_parallel_mthread(PARSEDARGS, workers=true) - parsed_args = parse_commandline() - if parsed_args["cpus"] ≠ nothing - if parsed_args["cpus"] > cpuinfo_physicalcores() - warn("Number of specified cores exceeds the physical core cound. Performance will suffer.") - end - Blas.set_num_threads(parsed_args["cpus"]) - end N = parsed_args["N"] radius = 2 diff --git a/SL.jl b/SL.jl index 4e32752..a57d7f3 100644 --- a/SL.jl +++ b/SL.jl @@ -51,7 +51,7 @@ end const PARSEDARGS = parse_commandline() include("CPUselect.jl") -# set_parallel_mthread(PARSEDARGS, workers=true) +set_parallel_mthread(PARSEDARGS, workers=true) using SCS.SCSSolver using Nemo