-
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
Deriving resources from a scope #4
Comments
Actually, rather than having a function to add resources to a scope, we need a function to derive or extract resources from an existing scope (and thus from resources owned). This function can be used when individual workers want to launch work on a specific set of resources.
This function creates |
We should keep track of what objects are given so that we do not give them again until they are freed. We can use |
New suggestion for the function name: |
Thank you, @samuelkgutierrez! The semantics look good based on |
@samuelkgutierrez, I am trying out
The strange behavior is apparent here:
|
Perhaps, I need the AFFINITY_PRESERVING flag? If so, shouldn't it be the default? I guess, I need to read a bit more to fully understand. I think this issue may be related to Issue #9 rather than this page's issue. |
Tested
|
In the example above, each task gets a scope with 1 core:
The scope is not released, then each task asks for 10 cores:
In this case, cores |
I don't think we want to exclude the possibility of resources being shared across scopes. We could certainly make better decisions when resource reference counting is implemented, but I don't like the idea of returning a resource exhaustion error code. |
I agree @samuelkgutierrez, resources being shared across scopes is fine. The issue here is as follows: |
Now that we have
|
We need a function to add resources to a given scope. For example, if a user starts with an empty scope, she may want to add resources assigned to her that are part of the user scope.
int qv_scope_add(QV_handle qv, QV_scope_t scope, QV_obj_type_t obj, int num_objs);
This function adds
num_objs
objects of typeobj
to the input scope.The text was updated successfully, but these errors were encountered: