payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 26 forks source link

Existing work directory stops run #250

Closed aidanheerdegen closed 3 years ago

aidanheerdegen commented 4 years ago

It confuses users that if they try

payu run

when there is still a work directory they get

payu: error: work path already exists: /scratch/v45/aph502/mom6/work/double_gyre_test.
             payu sweep and then payu run

A better solution might be a dialog like:

There is an existing work directory which will be deleted if this run continues, do you want to proceed ? [Y/n]
aidanheerdegen commented 4 years ago

Related issue, the same dialog prints for payu run and payu setup. Ideally the message would be different for the latter case.

marshallward commented 4 years ago

I support this change.

aidanheerdegen commented 4 years ago

I am dumb. This change would require setup to be run before the PBS submit. This is not a trivial change.

I guess you realised that @marshallward? Do you still want me to go ahead with this?

marshallward commented 4 years ago

Maybe at one time I realised it, can't say I see why at the moment :{. I guess it is because we do everything after submission?

This does seem to be touching on the more general problem of doing everything after submission, rather than pre-submission.

I think payu setup is still more of a debug feature, so if there's not a way of doing this automatically then maybe hold off on it.

aidanheerdegen commented 4 years ago

Yeah.

Could have a halfway house of defining a config.yaml variable to blow away work with payu run but this only helps experienced users who know to set it.

What to call it? All options seem ugly

wipe_work overwrite_work

Or could add a command line option, -o for overwrite, or -f for force. That is probably a better option, and one that would still be useful even if the proposed feature was implemented.

aidanheerdegen commented 4 years ago

I like the option idea so much I'm starting a new issue for it.

marshallward commented 4 years ago

I like the force flag idea. (-o often means output in many programs).