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

Nohup #75

Merged
merged 9 commits into from
Jun 7, 2014
Merged

Nohup #75

merged 9 commits into from
Jun 7, 2014

Conversation

rjleveque
Copy link
Member

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.

Randy LeVeque added 4 commits April 11, 2014 21:11
…up mode with this niceness. Also convert nohup and nice from str to bool in runclaw since Makefile passes in string False rather than boolean.
@@ -25,6 +25,17 @@ def runclaw(xclawcmd=None, outdir=None, overwrite=True, restart=False,

If rundir is None, all *.data is copied from current directory, if a path
is given, data files are copied from there instead.

If print_git_status is True, print a summary of the git status of all
Copy link
Member

Choose a reason for hiding this comment

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

useful!

Randy LeVeque added 4 commits April 17, 2014 10:23
to include other PRs that have been merged.

* master:
  Change .f to .f90 in conversion Makefiles
  fixed conversion/Makefile_amrclaw_2d to point to f90 rather than .f files
  allow environment passed in to make_all so they can be set in run_tests.py
@rjleveque
Copy link
Member Author

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.

@mandli
Copy link
Member

mandli commented Jun 6, 2014

This looks good to me and will be a nice additional feature.

@ahmadia
Copy link
Member

ahmadia commented Jun 6, 2014

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.

…onvert any non-integer to None (including string 'None')
@rjleveque
Copy link
Member Author

Good catch @ahmadia. That wasn't the intention and I fixed it so None is the default.

@ahmadia
Copy link
Member

ahmadia commented Jun 6, 2014

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.

@ahmadia
Copy link
Member

ahmadia commented Jun 6, 2014

@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.

@rjleveque
Copy link
Member Author

@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.

@ahmadia
Copy link
Member

ahmadia commented Jun 6, 2014

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.

mandli added a commit that referenced this pull request Jun 7, 2014
@mandli mandli merged commit 0373aa1 into clawpack:master Jun 7, 2014
@rjleveque rjleveque deleted the nohup branch June 7, 2014 23:20
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.

3 participants