From 8e7d273db2a487a9873215fb8737e93321a24352 Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 6 Jun 2017 18:01:59 +0200 Subject: [PATCH] create dirname from parsed N and radius --- Orb_AutF4.jl | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Orb_AutF4.jl b/Orb_AutF4.jl index c5e0b01..da09491 100644 --- a/Orb_AutF4.jl +++ b/Orb_AutF4.jl @@ -221,17 +221,16 @@ function init_data(name::String, N::Int; radius=2) end function main() - name = "SOutF4_E4" - - if !isdir(name) - throw("Create dir with all the required orbit data first!") - end - radius = parsed_args["radius"] - - logger = PropertyT.setup_logging(name) - parsed_args = parse_commandline() + N = parsed_args["N"] + radius = parsed_args["radius"] + dirname = "SOutF$(N)_E_r=$radius" + + isdir(dirname) || mkdir(dirname) + + logger = PropertyT.setup_logging(dirname) + if parsed_args["cpus"] != nothing if parsed_args["cpus"] > cpuinfo_physicalcores() warn("Number of specified cores exceeds the physical core cound. Performance will suffer.") @@ -239,8 +238,6 @@ function main() Blas.set_num_threads(parsed_args["cpus"]) end - N = parsed_args["N"] - init_data(name, N, radius=2) tol = parsed_args["tol"] iterations = parsed_args["iterations"]