-
Notifications
You must be signed in to change notification settings - Fork 109
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
Support an alternative flexible allocation scheme that would submit unique copies of the same test on different nodes #2334
Comments
In #2395 you gave some comments, but since we closed it as duplicate, let's continue here.
I'm not sure I understand you correctly here. Do you mean we cannot simply do e.g.
because the get_node_names() function would need to return a different node set for
I guess that is the solution we essentially discussed on the Slack channel, right? To give an example, I now developed a test that does:
(ignore the hardcoded nodelist for now, I'm sure we can do that much more elegantly when something like this is properly integrated in the framework). This works, but as you say, having to put the I would think that it might be possible to integrate this expansion in the framework though. I.e. the user would specify something in the class body to signal that this is a test of which one copy should be run on each node with a certain status, e.g.
And that the framework then generates copies of the test where it takes all (valid) permutations of valid_system + node name combinations. The case doesn't seem so different from e.g. generating the all valid permutations of valid_systems + valid_prog_environs. E.g. a test that does:
and a ReFrame settings file that defines:
Would also generate tests only for the valid combinations of systems + programming environments (i.e. But then... I obviously don't know the framework as well as you guys, so maybe this is much more difficult for partition+nodename combinations than it is for partition+prog_env's... :) |
Exactly.
Right.
Indeed, but actually it is not so much code. You can write this in a much simpler way: # NOTE: I'm using sets here for a quick look up in `find_systems` in case you have very long node lists.
nodelists = {
'A:part1': {'node1', 'node2'},
'A:part2': {'node10', 'node11'},
}
def find_system(node):
for system, nodes in nodelists.items():
if node in nodes:
return system
class my_test(...):
nodeid = parameter(itertools.chain(*nodelists.values()))
@run_after('init')
def scope_systems(self):
self.valid_systems = [find_system(self.nodeid)] In any case, I agree that trying to define a parameter based on the value of a variable, is a recurring pattern that also arises in test libraries, so it should be addressed by the framework. I think the solution you propose is not going towards the right direction. First, I don't think that an additional test variable is needed. My idea is to allow users to run any single node test flexibly without having to change anything in the test. Users could use tags to mark tests that they will run flexibly. I am leaning towards something like this:
I don't like very much the Internally, all we need to is to create programmatically a test with a different name for each of the system partitions, deriving from the original one, that will be parameterized on the node list of the corresponding partition. And those tests will be generated only if the current system is listed in the |
This is different from the current flexible tests, which submits one test on multiple nodes. The problem with the current setup is that you probably need to change the benchmark you are running in order to include node information, which also makes much tougher the sanity checking as well as performance checking that would allow us to identify bad nodes.
The text was updated successfully, but these errors were encountered: