-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Allow dependencies between partitions #1481
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
[feat] Allow dependencies between partitions #1481
Conversation
|
Hello @ekouts, Thank you for updating!
Do see the ReFrame Coding Style Guide Comment last updated at 2020-11-04 09:45:17 UTC |
Codecov Report
@@ Coverage Diff @@
## master #1481 +/- ##
==========================================
- Coverage 91.65% 91.56% -0.09%
==========================================
Files 83 83
Lines 13012 13034 +22
==========================================
+ Hits 11926 11935 +9
- Misses 1086 1099 +13
Continue to review full report at Codecov.
|
|
First of all, I want to say that I love this feature! I have been dreaming about this one for quite some time now... 😄 I am a bit lost with the naming logics of Basic ideaGiven the tests DEPEND_BY_ENV meaningIn the context of the ReFrame check, where one writes The as
I think the original mindset we had was the sentence:
Using the notation above DEPEND_BY_PARTITION meaningIn the context of the ReFrame check, where one writes The as
The
Using the notation above DEPEND_EXACT meaningIn the context of the ReFrame check, where one writes The as
In the original mindset:
Using the notation above ConclusionsThe original notation for So, I think we should change the name from A non-optimal proposal is to rename it to |
victorusu
left a comment
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 am requesting a name change for DEPEND_BY_PARTITION, but I am not sure what should be the replacement. We should come up with some logic.
|
Should we also add a test for |
@victorusu For me it makes sense as it is now, but of course I am open to change to whatever is more useful. As far as I understand the meaning of Similarly The new |
|
@ekouts, Ah! |
victorusu
left a comment
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.
Since the naming scheme got clarified... 😂
lgtm
|
The meaning of "by" in the Assume that tests DEPEND_FULLYThat's the fully connected graph with 16 edges, which I skip from posting it here. DEPEND_BY_ENVThat's essentially two graphs, one per each environment, fully connected per partition: DEPEND_BY_PARTITIONThe exact analogous of DEPEND_BY_ENV and DEPEND_BY_PARTITIONThis can be represented as a bitwise OR in the DEPEND_EXACTExactly as before. The user can create the exact relationships by herself. I think the definitions I just presented are consistent and cover all the possibilities. By reading the comments here, I think that the current PR does not follow exactly this principle am I right? |
@vkarak You are right, the |
|
We discussed this a bit further with @victorusu and came up with a more general and flexible solution. To avoid the confusion that the self.depends_on('T1', when=always)
self.depends_on('T1', when=part_equal)
self.depends_on('T1', when=env_equal)Then These predefined functions are as simple as follows: def always(src, dst):
return True
def part_equal(src, dst):
p0, _ = src
p1, _ = dst
return p0 == p1
def env_equal(src, dst):
_, e0 = src
_, e1 = dst
return e0 == e1You could even define a function that would create dependencies only if the target partition has a specific name: def target_part_is(name):
def _has_edge(src, dst):
return dst[0] == name
return _has_edgeAnd then self.depends_on('T1', when=target_part_is('foo'))I also believe that this approach will simplify a lot the building of the dependency DAG. I suggest moving this PR to ReFrame 3.3, since there is too little time to make it for this release. |
vkarak
left a comment
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.
Check my last comment in the main conversation.
|
I converted this to a draft. |
|
@ekouts Another thing we will need is to update the tutorial example of dependencies. Since we now support dependencies across partitions, we could have a test that only downloads the OSU benchmarks running on the |
vkarak
left a comment
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.
Just minor comments. Regarding the documentation, I will go over it and I will fix myself anything wrong there.
|
I've updated the documentation. The only thing remaining is to update the tutorial example. |
…uts/reframe into feat/dependencies_between_partitions
….com/ekouts/reframe into feat/dependencies_between_partitions
vkarak
left a comment
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.
The updated tutorial example looks ok. We need to update the text and pay attention to the builtin environment that you have added. You may need to update the text of the main tutorial, too.
vkarak
left a comment
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.
All good! Ready to go!
|
Oh, still some PEP8 issues, I can fix them. |
victorusu
left a comment
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.
lgtm too! Excellent PR. With lots of discussions! Love it!
…uts/reframe into feat/dependencies_between_partitions
|
For the failing tutorial check, see issue #1573. |
Closes #1378 .