-
Notifications
You must be signed in to change notification settings - Fork 4
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
New thread interface #70
Comments
What is proposed here simplifies the original design while avoiding the coexistence of two different paradigms (original QV + layouts). I think that the current examples will need some marginal modifications in both Pthreads and OpenMP cases. One potential issue is that |
Perhaps, we can discuss this in the next meeting? I don't follow why |
Please bear in mind that this example was written with the old "way" in mind. |
Thanks for clarifying, @GuillaumeMercier . |
New names should be:
|
I'm trying to code both routines and I've got a few questions:
|
@GuillaumeMercier , this was the first draft of the interface. The latest one is on Issues #68 and #69 (when we were discussing merging the process and thread interfaces). Please see below and let me know if you still have questions :) |
|
|
@eleon : Ok, thanks. But my second point is still valid, though. |
Indeed, @GuillaumeMercier For now, I'd suggest to start with For |
Yes, it's exactly my plan. But I you want to implement |
Understood, @GuillaumeMercier . One possible way to implement |
Hmm. Not sure about that. To me, the logical thing would be to split from the current level of the context. Otherwise, what is the point of having it as a parameter? Or am I missing somrthing? |
That makes sense, @GuillaumeMercier . Then, I would say start from the current level and down the hierarchy until you match the number of |
Yes, but how do you get the current level? That's my whole point. I don't see a way to do this currently. @samuelkgutierrez: do you have an idea? |
Would something like this work, @GuillaumeMercier? Get the current level by first getting the input scope's cpuset: Then operate on the cpuset as necessary. If this doesn't work for your use case, then we should have a talk offline. |
I'll take a look and let you know. A question, though: would it be relevant to store the type information in the scope structure directly? |
Can you expand on what you mean by 'type information?' |
Sure. The scope is "associated" (for the lack of a better word to some resources, which have a type |
Oh, I see. A scope is associated with a hardware pool that manages the low-level details of the types of resources that a scope manages. In that way, a scope already has that type information associated with it. More directly to your question: the cpuset associated with a hardware pool more generally describes the CPU resources tied to that scope. We have functions that allow us to query the types of resources covered by that cpuset, but there may not be a perfect one-to-one correspondence, since the cpuset could be irregular, potentially covering multiple simple types that we expose to a user. If you're interested, let's just have a call. Send me an email, if you are interested. Will be much quicker, I think. |
I can't make a call today. But as I wrote, I'll try with the information you gave me (very helpful). Once I've tried to code something it will be more interesting to talk about this point again. As for the irregular cpusets management, I coded something about that in my Hsplit library recently to support some MPI 4.1 feature that could be applicable here too. |
Sounds like a plan, @GuillaumeMercier. |
@GuillaumeMercier |
What about |
To your second question: both should point to the same |
I saw this comment in
Is it really invalid? Maybe I'm biased by MPI but a process might not want to be part of a split by giving as a color |
As of today, the comment is correct because we don't implement those semantics just yet. |
I had my epiphany today about this split operation and:
|
You are correct that I would suggest first seeing if the |
I just realized something, @GuillaumeMercier. |
Yes, I know but I was thinking about calling the routine |
Ah, that might work! I hope it does. |
|
Aah. I was looking for this: |
|
The current issue with |
All good points, @GuillaumeMercier. Let's add these issues to our meeting's agenda. |
@samuelkgutierrez : I put this comment so that we can think about it before the meeting. |
And yes, I'm stuck with the implementation ... |
Fine-grain affinity for threads will use similar abstractions to those used for processes in QV.
Here are a few examples for OpenMP and POSIX threads. These assume the process already has a NUMA scope defined.
OpenMP example 1: Launch one thread per core.
OpenMP example 2: Launch two threads per core.
POSIX threads example:
This issue is related to issues #68 and #69. We want a single
qv_scope_split
and a singleqv_scope_split_at
, e.g., no specialqv_scope_th_split
.An actual Pthreads example can be found here: https://github.com/hpc/quo-vadis/blob/master/tests/test-progress-thread.c
The text was updated successfully, but these errors were encountered: