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

Sweep before changing branches #418

Open
aidanheerdegen opened this issue Feb 12, 2024 · 3 comments
Open

Sweep before changing branches #418

aidanheerdegen opened this issue Feb 12, 2024 · 3 comments
Assignees

Comments

@aidanheerdegen
Copy link
Collaborator

The new branching capabilities are brilliant!

But .. I forget to payu sweep before I payu checkout another branch. And then the next time there is a sweep, either intentionally or via payu run -f, all the logs get copied into the wrong archive directory.

I propose payu does a sweep before changing branches. I think from a design point of view it makes sense too: the user is presented with a clean new experiment control directory.

@aidanheerdegen aidanheerdegen self-assigned this Feb 19, 2024
@aidanheerdegen
Copy link
Collaborator Author

The PBS log files are named solely for the jobname config value or the directory in which they are contained

https://github.com/payu-org/payu/blob/master/payu/schedulers/pbs.py#L60

and the same logic is repeated in sweep

https://github.com/payu-org/payu/blob/master/payu/experiment.py#L907-L908

It would be good if the PBS jobname and therefore the STDOUT and STDERR filenames include the UUID in some way.

One possibility is to make the PBS job name the same as the experiment name. A wrinkle is that PBS job name has a maximum length of 15, which would often truncate the experiment name before the UUID.

For an example, here is an experiment name

1deg_jra55_ryf-no_ncimpi-16fefa3b

One possibility is to retain all the truncated UUID and reduce the rest to fit in the 15 character limit, for the above this would be

1deg_j-16fefa3b

That shows such little info about the experiment that it probably doesn't make much sense.

Another option is to truncate the ID further, say 4 digits, and it would look like

1deg_jra55-16fe

@aidanheerdegen
Copy link
Collaborator Author

Or we could just leave it as is because difficult.

@aidanheerdegen
Copy link
Collaborator Author

Should we be auto-sweeping all but the last PBS log files from the control dir?

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

No branches or pull requests

1 participant