Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] Moving Workers from One Context To Another in Real Time

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] Moving Workers from One Context To Another in Real Time


Chronologique Discussions 
  • From: Gabriel Gazolla <gabrielgazolla@gmail.com>
  • To: Andra Hugo <andra.hugo@inria.fr>
  • Cc: starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] Moving Workers from One Context To Another in Real Time
  • Date: Tue, 28 Mar 2017 11:51:32 -0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabrielgazolla@gmail.com; spf=Pass smtp.mailfrom=gabrielgazolla@gmail.com; spf=None smtp.helo=postmaster@mail-yw0-f175.google.com
  • Ironport-phdr: 9a23:uAzCjRVYQ22YSnE/iDrEtlHe8Y/V8LGtZVwlr6E/grcLSJyIuqrYbB2At8tkgFKBZ4jH8fUM07OQ6PG8HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLd9IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KpwVhTmlDkIOCI48GHPi8x/kqRboA66pxdix4LYeZyZOOZicq/Ye94RWGhPUdtLVyFZGIOzbYUPAeoPM+hbsofzuUcBoACkCgWwHu7i0CNEimP00KA8zu8vERvG3AslH98WsXrbts76NL0TUe+ryKnD0DTNYOlX2Df67IjIdgouquyLULJ/a8Xe0lMvFwLbgVWUpozqJTKU1uMJs2if9eVtTu2vi2s9pAFwpjij3Nsjio7Mho8MzF3P6Ct3wIEwJdKiSU57Z8apEIdetiGbK4t2Xt0tQ3tytCkmzb0GvIa3fCkMyJQ9xh7QceaLc4aS4h/lSe2fIi94iWp7dL6jgxu+60utx+3mWsWp0VtGszBJnsTOu30N0RHY99KJReFn/ki73DaCzwDT5f9AIUAzjafbLoQuwr80lpYKsUXCEDP6lFz4jKOLdEgp+vKk6+vgYrXhqZ+cM5F7hhviPaQpn8yzGeU4Mg4QUGiH4emwyqHv8EnjTLhJjvA6iLTVvZHHKcgBu6K0AQ9Y3p4m6xmlDjem1NoYnWMALFJAYB+HgJLmNErUIPD5E/i/h1usny1qxvDBOr3hBo/CI2PMkLfkZ7l96kpcxBAvwtBY4pJYEqsBL+7rWk/tqNzYCQc0Mxeow+n9EtV9zp4eVXuSDaCHLqPdr1uI6/krI+mNf48VpC39J+Iq5/7gin85g1Adcrez0ZsWbnC4BPVmLF+DbXrimNdSWVsN6yM4QPbjwH2fXjkbM3+0U7g1oDEmB4WODIHZR4nrjqbXjx22BplHWmcTBVmGC3blc4qNSfAIbCu6LcpokzhCXr+kGKE70hT7mwbw0btqKqL78z8fsZbqnIx67ufJlBw2+jVmCMCZ2kmCSmh1miUDQDpgj/M3mlB01lrWifswuPdfD9EGoqoRCgo=
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hello Andra,

Thanks for all information!

I have another final question for you (Consider that I am not using hypervisor):

Is it possible to make a task prefer a certain worker (inside a context of 3 workers for instance) ?

I would like to this task to use Worker 2 inside Context 1 which has 3 workers, since I know it will execute faster....but there`s no problem if the task is assigned to another worker inside this context, but it would be better...

Is there a way to set or do this ?

Best,

Joao Gabriel

On Tue, Mar 28, 2017 at 11:25 AM, Andra Hugo <andra.hugo@inria.fr> wrote:
Hi Gabriel,

You should use the hypervisor in that case and use the idle strategy.

In sc_hypervisor/examples you have a few examples of how to do that. Let me know if you need any help with that.

Best,
Andra



De: "Gabriel Gazolla" <gabrielgazolla@gmail.com>
À: "Andra Hugo" <andra.hugo@inria.fr>
Cc: starpu-devel@lists.gforge.inria.fr
Envoyé: Mardi 28 Mars 2017 14:50:12
Objet: Re: [Starpu-devel] Moving Workers from One Context To Another in Real Time


Hello Andra,

Thanks for your fast answer. Now i know that this function you indicated do this "adds dynamically the workers in workerids_ctx:, thank you very much!

I hope you can help me in another question:

1) How Can I test from time to time that Context 2 Queue Line of Tasks is Empty so I can move the workers back to Context 1 dinamically ? Notice that I already submitted all the tasks to both contexts and after that there`s the barrier starpu_task_wait_for_all(), is it anywhere between the submission and this barrier?

Best,

Joao

On Tue, Mar 28, 2017 at 4:39 AM, Andra Hugo <andra.hugo@inria.fr> wrote:
Hi Gabriel,

You can call starpu_sched_ctx_add_workers and starpu_sched_ctx_remove_workers. If you call only starpu_sched_ctx_add_workers without removing the workers from the other context, the workers will be shared between the two contexts and do round robin when poping tasks.

Does this answer your question?

Best,
Andra

De: "Gabriel Gazolla" <gabrielgazolla@gmail.com>
À: starpu-devel@lists.gforge.inria.fr
Envoyé: Mardi 28 Mars 2017 02:12:03
Objet: [Starpu-devel] Moving Workers from One Context To Another in Real        Time


Hello StarPU Team,

I have an interesting question, I hope you can help me...

Imagine this situation:

I have two contexts: Context 1 (CPU1, CPU2, CPU3) and Context 2 (GPU1)
With starPU paused i submit 900 tasks to Context 1 and 100 tasks to Context 2.
After I submit all of them, I resume, so all the tasks can start to execute.
i put the function starpu_task_wait_for_all(); to wait for all the tasks to finish.

Now comes the tricky part:

I already know that Context 2 is going to finish light years faster than Context 1, I would like to move all workers from Context 2 to the Context 1, so the workers on Context 2 can help Context 1 finish faster. Is it possible to do it ? or do I need to wait for the barrier starpu_task_wait_for_all(); ?

===
I tried to do this with starpu_sched_ctx_set_inheritor, starpu_sched_ctx_finished_submit() and starpu_sched_ctx_delete().....but I think it doesnt work on the described situation, since I need to wait for the barrier starpu_task_wait_for_all() to one context inherit the workers of another context, am I right? or is there a way how to do it like on the described situation in real time?

Thanks for any help or commentaries!

Best,

Joao




_______________________________________________
Starpu-devel mailing list
Starpu-devel@lists.gforge.inria.fr
https://lists.gforge.inria.fr/mailman/listinfo/starpu-devel




--
Gabriel Gazolla
Doutorando em Computação - IC/UFF





--
Gabriel Gazolla
Doutorando em Computação - IC/UFF



Archives gérées par MHonArc 2.6.19+.

Haut de le page