Closed rjleveque closed 10 years ago
This PR was updated in April so that it doesn't always use nice with nohup, and some other improvements. It's been used fairly extensively since then on a probabilistic tsunami study, so I suggest merging in unless there are more suggestions.
This looks good to me and will be a nice additional feature.
Don't let me get in the way of merging this PR. I just want to point out that the default behavior from the Makefile is to now call the program with nice 7
, which might be confusing to somebody who expects their simulation to run at normal speed.
Good catch @ahmadia. That wasn't the intention and I fixed it so None is the default.
Does that do what you want? I can't figure out from looking at the code so I'm trying to run a test case.
@rjleveque - I don't think does what you want. Re-reading the code, you're passing "None" is as a string, which won't be automatically converted into the None type. I know the options-parsing in Python is not great, but this code would really benefit from refactoring either into the optparse (portable) or argparse (2.7+
) module.
@ahmadia, yes I agree it should be cleaned up at some point, but I thought it worked now with the change to runclaw.py that's also in this commit, which resets the string to a proper None.
Sorry, I missed that. The logic looks correct now, and it sounds like you're using this in production. I don't really maintain clawutil
(I think it's mostly you and Kyle), so I think you should just merge this in when you're ready.
For running in batch mode on remote machines it is useful to be able to run the code in nohup mode (keep running if connection is broken) and to nice the job.