-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Renamed sched.test_cmd to sched.launch and added alias #751
Open
debonisd
wants to merge
8
commits into
develop
Choose a base branch
from
sched-test-cmd
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e9e8bd5
Renamed sched.test_cmd to sched.launch and added alias
ba248f7
Update __init__.py
debonisd 81e2c28
missed the base class
debonisd e496032
Merge branch 'master' into sched-test-cmd
debonisd 380dce1
Merge branch 'master' into sched-test-cmd
Paul-Ferrell 088d9ef
Update scheduling.rst
debonisd 75b8c11
Update vars.py
debonisd c0e8c21
Merge branch 'develop' into sched-test-cmd
Paul-Ferrell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,4 @@ base: | |
- "{{mpis}}" | ||
cmds: | ||
- "set -x" | ||
- "{{sched.test_cmd}} ./mpi_hello" | ||
- "{{sched.launch}} ./mpi_hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ base: | |
- "{{compilers}}" | ||
- "{{mpis}}" | ||
cmds: | ||
- "{{sched.test_cmd}} ./stream" | ||
- "{{sched.launch}} ./stream" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ class of this that contains all the variable functions it provides. | |
|
||
This class is meant to be inherited from - each scheduler can provide its own set of variables | ||
in addition to these defaults, and may also provide different implementations of | ||
each variable. Most schedulers can get away with overriding one variable - the 'test_cmd' | ||
each variable. Most schedulers can get away with overriding one variable - the 'launch' | ||
method. See the documentation for that method below for more information. | ||
|
||
Return values of all variables should be the same format as those allowed by regular test | ||
|
@@ -47,6 +47,7 @@ class of this that contains all the variable functions it provides. | |
'test_min_cpus': '4', | ||
'test_min_mem': '32', | ||
'tasks_total': '180', | ||
'test_cmd': '# This is an alias to "launch"', | ||
} | ||
|
||
# Scheduler variable errors are deferred. We'll handle them later we we create | ||
|
@@ -155,7 +156,7 @@ def partition(self): | |
|
||
return self._sched_config['partition'] or '' | ||
|
||
def _test_cmd(self): | ||
def _launch(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're still missing the alias. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrap the alias as a |
||
"""The command to prepend to a line to kick it off under the scheduler. | ||
|
||
This should return the command needed to start one or more MPI processes within | ||
|
@@ -176,14 +177,20 @@ def _test_cmd(self): | |
|
||
return '' | ||
|
||
@var_method | ||
@dfr_var_method | ||
def test_cmd(self): | ||
"""Alias to the launch command""" | ||
|
||
return self.launch() | ||
|
||
@var_method | ||
def launch(self): | ||
"""Calls the actual test command and then wraps the result with the wrapper | ||
provided in the schedule section of the configuration.""" | ||
|
||
# Removes all the None values to avoid getting a TypeError while trying to | ||
# join two commands | ||
return ''.join(filter(lambda item: item is not None, [self._test_cmd(), | ||
return ''.join(filter(lambda item: item is not None, [self._launch(), | ||
self._sched_config['wrapper']])) | ||
|
||
@dfr_var_method | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a (formerly
sched.test_cmd
) to the docs here.