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
Add support for creation of parallel task when no engine is running #826
Comments
This is already true in trunk for load-balanced tasks. Obviously, you can't send jobs to particular engines that don't exist. |
Thanks. This works with the 0.12 branch. |
With IPython 0.12, I just noticed that I can't get information about tasks using rc.query_db() which where created when no engine was running until I start an engine. The start of the first engine seems to trigger ipcontroller to make that information available. Is this intended? |
Hmm. The TaskScheduler disables the on_recv callback from clients when there are no engines, because it is certain that tasks cannot be submitted. This means that they sit in the ØMQ queue, and do not trigger the callback that notifies the Hub, putting the request in the database. I imagine I can adjust it in such a way that the tasks are pulled into Python, instead of left in the buffer. |
If you need further proof let me know. Can you reproduce this behaviour? |
Sorry if I wasn't clear, I was trying to explain why you see what you are seeing. The Hub (the process that maintains the DB) will not get tasks submitted while there are no engines, because the TaskScheduler never calls recv, leaving messages in the upstream ØMQ buffer. Essentially the queue processing is paused slightly further upstream than you would like. I will look into addressing this. |
Thank you for your explaination. Is there any workaround for this? |
Modifying IPython/parallel/controller/scheduler.py made it work, but this is obviously not the solution:
|
I think that is approximately the solution you are looking for (I'll do a PR shortly). There certainly isn't a workaround with code as it is, because it is functioning exactly as designed - the Scheduler is entirely halted while no engines are registered. But with the changes to the scheduler supporting dependencies, etc., I think this should work fine with only minor tweaks. |
Improve Hub/Scheduler when no engines are registered 1. Tasks are pulled into the schedule, rather than left on the ZMQ queue, which means they enter the database. 2. queue_status will not raise NoEngines when there aren't any, instead it will still fetch the available information. Bug fixed in db_query, where behavior did not match docstring (buffers should be excluded if no keys are specified). closes ipython#826 (again)
IPython-0.11 complains when I try to create a parallel task when no engines are running. This makes sense for users who need results directly after they create a task. But there are also users who would like to create tasks in advance, before any engines are started. These tasks could have been stored in ipcontroller/backend database. When the first engine connects to ipcontroller it could start processing those tasks.
The text was updated successfully, but these errors were encountered: