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

creating directories #59

Closed
eclare108213 opened this issue Dec 26, 2017 · 2 comments · Fixed by #61
Closed

creating directories #59

eclare108213 opened this issue Dec 26, 2017 · 2 comments · Fixed by #61

Comments

@eclare108213
Copy link
Contributor

When scripts create new directories, please have them first check whether the directory exists. This example came up when I tried to re-run a restart test in a previously used run directory, using a slightly different namelist configuration.

mkdir: cannot create directory `/net/scratch3/eclare/ICEPACK_RUNS/pinto_restart_col_1x1_debug.testrestart/diags_baseline': File exists

Let's keep an eye out for cases when we really do not want to re-use an existing directory, but most of the time it's probably okay for those of us doing manual shortcuts in/around the usually automated test suite.

@mattdturner
Copy link
Contributor

What is the desired behavior? Do you want the scripts to error out if the directory already exists, or just skip the mkdir command and continue?

@eclare108213
Copy link
Contributor Author

Just skip and continue. This is what we did in the old cice scripts:
if !(-d $EXEDIR) mkdir -p $EXEDIR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants