-
Notifications
You must be signed in to change notification settings - Fork 407
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
Respawn when memory pool allocation fails (not available memory) #940
Comments
Do you mean respawn when memory pool allocation might be available; e.g., the dependence is that some other task has deallocated memory? |
I mean respawn when memory is not available. I am going to use tight bound of memory pool and sometimes it is possible that memorypool cannot allocate. However, I know some memory will be released and available while executing tasks and I want to put this task back and check memory again with respawning. Since this task already satisfy the dependence, dependence would not be changed. |
I tested respawn with an empty future. It seems to be working but I am also concerned about whether this is an expensive way to do spin lock. Any better suggestion ? |
@kyungjoo-kim I'm not sure if it's even possible to implement a spin lock this way. I remember wanting to use Kokkos tasks for MPI polling (since MPI doesn't promise to make asynchronous progress on nonblocking operations), but Christian said it wouldn't work. |
@kyungjoo-kim Did you try |
this is not exactly polling and I do not have a control when this respawned task is executed. my work scenario is
so, there is a dynamic situation that a task want to allocate space but it may not available due to several reasons. anyway, it indicates that there are tasks to be processed and this thread is used for such computation. my intention is to make the code robust (not about performance, but I am pretty sure this does not hurt performance either as long as I can make all processors busy). i am not sure if this example is analogous to mpi polling. maybe you can use "low" priority when the polling task is respawned so that it is not executed too often. |
Yes - "low" priority where everything else is "high" or "regular" |
no. |
The above respawn should work, this is a bug. @kyungjoo-kim : Aside from that, are you asking for a respawn dependence that is satisfied by any other task being deallocated? |
uuummmm.... I think that I do something really stupid.... yes I did. the respawn without dependence is to reuse my code again as it includes some repeated pattern. i do this respawn instead of putting the same code block duplicated. |
future array with stride ??? when I construct a block of futures with other meta information, for instance
|
Bug fix for |
@hcedwar
I would like to respawn until it gets available memory. Current respawn API requires dependence.
How can I respawn this like periodic pooling
The text was updated successfully, but these errors were encountered: