Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/allow ensemble dir overwrite #1041

Merged
merged 15 commits into from
Aug 3, 2023
Merged

Feature/allow ensemble dir overwrite #1041

merged 15 commits into from
Aug 3, 2023

Conversation

jlnav
Copy link
Member

@jlnav jlnav commented Jul 12, 2023

User can set libE_specs["reuse_output_dir"] to prevent intentional errors and warnings on attempting to reuse an ensemble directory.

Keep in mind "overwriting" a sim_dir with a new one really means deleting old copied and symlinked files over.

Another consequence of this approach and the current sim/gen-dir naming scheme is if subsequent runs overwrite the same ensemble directory, but different workers each time process the same sim_id, then both sim_dirs for that sim_id will be retained.

"reuse_ensemble_dir"


  1. Set libE_specs["reuse_output_dir"] = True to allow subsequent runs to operate within a previous ensemble directory
  2. workerID suffix removed from calculation directories

Addresses #1028 and #1027

@shuds13
Copy link
Member

shuds13 commented Jul 13, 2023

Name of option?
Maybe reuse_ensemble_dir

We should remove appending of worker ID to each sim_dir so they don't get re-run under different worker and produce another dir.

It is not "overwriting" a sim_dir, but overwriting input files.

@jlnav jlnav requested a review from shuds13 July 18, 2023 16:36
Copy link
Member

@shuds13 shuds13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions:

  • Modify top comment on PR (remove "allow_dir_overwrite")

also add separating log files to workflow dirs to bullet list - as there are multiple features here

  • In ensemble dir exists message - add use libE_specs["reuse_ensemble_dir"] = True to allow reuse of dir.
  • created dirs like test_workflow0_nworkers3_comms-local/ need to be cleaned in run_scripts.sh

I think we also need to make reuse_ensemble_dir work when there is a named workflow dir as this is how Optimas now runs.
ie. if you add libE_specs["reuse_ensemble_dir"] = True to test_workflow_dir.py it wont rerun. This could be incorporated into the test with 2 libE() calls.

@jlnav jlnav requested a review from shuds13 August 1, 2023 18:26
@shuds13 shuds13 mentioned this pull request Aug 1, 2023
34 tasks
@jlnav jlnav merged commit dfdcd4a into develop Aug 3, 2023
13 checks passed
@jlnav jlnav deleted the feature/allow_dir_reuse branch August 3, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants