Skip to content

Commit

Permalink
fixing overshoot on sim directory calc
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonpbarrows committed Aug 14, 2023
1 parent 3a176cc commit 8fa5acd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/simulation/simulation_partitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ function process_simulation_partition_cli_args(build_function, execute_function,
sim_name = options["simulation-name"]

# increment output_dir for new executions
base_dir = _get_output_dir_name(output_dir, sim_name)
if isempty(readdir(output_dir))
base_dir = joinpath(output_dir, sim_name)
else
id = _get_most_recent_execution(output_dir, sim_name)
base_dir = joinpath(path, "$sim_name-$id")
end

if operation == "setup"
required = Set(("simulation-name", "num-steps", "num-period-steps"))
Expand Down

0 comments on commit 8fa5acd

Please sign in to comment.