-
Notifications
You must be signed in to change notification settings - Fork 20
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
Renamed sched.test_cmd to sched.launch and added alias #751
base: develop
Are you sure you want to change the base?
Changes from all commits
e9e8bd5
ba248f7
81e2c28
e496032
380dce1
088d9ef
75b8c11
c0e8c21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" |
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" |
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 | ||
|
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.