-
Notifications
You must be signed in to change notification settings - Fork 865
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
POC: add support for hwloc v2 #3302
Conversation
It compiles on my hwloc v2 here and it looks like you have ported to the new v2 distances API since your comment? On the IO side, there are more changes. The IO_DEVICE topology flag is replaced with hwloc_topology_set_io_types_filter(topology, HWLOC_TYPE_FILTER_KEEP_IMPORTANT); (this enables PCI bridges, but we can filter more precisely if you want PCI and I/O devices without bridges). Then, we need to check whether there is any place where you look for I/O objects in the children list. They moved to the dedicated I/O children list. |
@bgoglin regarding the new distances API, i made
|
Something we are going to have to figure out is: how do we bring this in while retaining support for v1.x versions of HWLOC? We can't just switch over as many systems will not upgrade for quite some time. If we ship an embedded version of v2.0, then we'll need an "ext1x" component that can seamlessly handle all the differences. |
well, on the bright side, the
|
Is there a brief description somewhere of the pluses for switching to the 2.0 API? |
Well, given that several changes were requested by OMPI devs, I hope you will use it in the end :) There's no brief description yet. Major improvements are:
|
c44c7e4
to
9469c19
Compare
i just pushed my latest changes. the PR now compiles with both hwloc API v1 and v2 |
Will this approach work with external hwloc being either 2.0 or older ones? |
@hppritcha yes |
9469c19
to
c81a768
Compare
c81a768
to
060f205
Compare
060f205
to
be5ddf7
Compare
@ggouaillardet I need to move this along in prep for the HWLOC shared memory support, so I'll branch off of this point (if you don't mind) and submit something for your review. |
@rhc54 sure, please go ahead.
|
I'll raise the "do we stop embedding hwloc" question on the telecon this week. IIRC, we did hash that around a bit, but I don't think we ever reached conclusion - I think hwloc wasn't included in some really old distros (e.g., RHEL 5?). Of course, that shouldn't stop somebody from installing it. |
do you expect |
strictly v4, I think - I can't imagine porting it to v3 |
I added the embedding question to the topic list for the July meeting |
@ggouaillardet Can you clarify why allowed_cpuset and the WHOLE_SYSTEM flag isn't used anymore? I always wondered why it was used, so what's the reason for removing it in this hwloc 2.0 update and not earlier? I am actually thinking of removing the allowed_cpuset field from objects in 2.0 and just have a single topology-wide allowed_cpuset. People using the WHOLE_SYSTEM flag would have to look at and(obj->cpuset,topology->allowed_cpuset) for knowing whether obj is allowed. That's part of larger shrinking that will more likely remove obj->complete_cpuset first. |
IIRC, the flag was used because we were passing in an xml string that represented the entire system, not just the portion we had been allocated. It has been a long time, though, so I might be mistaken. |
FWIW: I'm not convinced it should have been removed. Regardless, you simplification removes any need for it. |
@bgoglin i checked the code and basically we currently use but as pointed by @rhc54, i did not check what happens if we pass a string/file with some cpus that are not allowed. anyway, i will fix the conflicts from now |
be5ddf7
to
213727a
Compare
Wait - what? I already fixed the conflicts and have this pretty much ready to go. What are you planning to do now? |
so we did the job twice ... |
My apologies - it is pushed to my OMPI repo. I just didn't file a PR as I was waiting for the shmem changes. However, I can add that separately, so why don't you go ahead and just commit this? We decided to continue embedding for now, perhaps changing the selection logic to take a suitable external version (if found in the standard locations) over the internal one. For now, I just want to get 2.0 working along with the HWLOC shmem support, so let's focus on that. |
no problem, i will update hwloc2x to the latest master and merge this PR tomorrow |
The hwloc API still isn't ready yet, don't merge this PR yet. Hopefully by the end of summer. |
@bgoglin If it passes our MTT tests, then why not merge it? There are a lot of HWLOC APIs, and we only use a handful, so there is unlikely to be any conflict. If we do get some later on, we can always update at that time. Merging this sooner would allow me to do the shmem integration, which is why I'm asking. |
213727a
to
5c09ceb
Compare
My concern was that the last missing API change is quite intrusive (it moves NUMA nodes out of the main tree, they will now be special "memory" children of objects). If you use the basic API like get_obj_by_type or depth (which seems to be case from what I see with a quick grep), no problem. If you use non-basic APIs (maybe like get_obj_inside_cpuset_by_type), I am not 100% sure yet if I'll be able to make them work transparently for NUMA nodes. If you manually traverse the tree using pointers, you'll need to update the code. Main example: If you ever look for your local NUMA node by walking up parent object pointers until you find a NUMA node object, you won't find it anymore (you'll need to look at parent "memory" children instead of parent). If that's fine, go ahead and merge it. |
5c09ceb
to
e515ad5
Compare
Signed-off-by: Gilles Gouaillardet <[email protected]>
checks related to offline and disallowed elements Signed-off-by: Gilles Gouaillardet <[email protected]>
Signed-off-by: Gilles Gouaillardet <[email protected]>
internal hwloc 2x is used with --with-hwloc=future Signed-off-by: Gilles Gouaillardet <[email protected]>
e515ad5
to
593e4ce
Compare
@bgoglin Thanks for the explanation. I don't see a problem with merging. If the API change impacts us, we'll just update when we pick it up. |
No description provided.