From raghav18076 at iiitd.ac.in Thu Oct 7 13:25:02 2021 From: raghav18076 at iiitd.ac.in (Raghav Gupta) Date: Thu, 7 Oct 2021 23:55:02 +0530 Subject: [argobots-discuss] Writing recursive task parallel program with argobots Message-ID: Hi, I am trying to use argobots for writing a recursive task parallel program. I have taken a very simple recursive task program example, where I am creating a parent argobot task which creates two child argobots tasks and then waits for them by calling ABT_task_free(). When I run this program with one xstream I find that it doesn't terminate. *(Code snippet - * https://gist.github.com/raghav0307/9252fc7b568bc35baab29bdc9da70618* )* My understanding is that this is because the parent task never yields the xstream to the child tasks, and hence the program gets stuck. This program terminates when I use argobot threads instead of argobot tasks. Could someone point me to why this is not working with argobot tasks? Best, Raghav -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghav18076 at iiitd.ac.in Thu Oct 7 13:28:07 2021 From: raghav18076 at iiitd.ac.in (Raghav Gupta) Date: Thu, 7 Oct 2021 23:58:07 +0530 Subject: [argobots-discuss] Writing recursive task parallel program with argobots In-Reply-To: References: Message-ID: Pasting the code snippet link again without any formatting - https://gist.github.com/raghav0307/9252fc7b568bc35baab29bdc9da70618 On Thu, Oct 7, 2021 at 11:55 PM Raghav Gupta wrote: > Hi, > > I am trying to use argobots for writing a recursive task parallel program. > > I have taken a very simple recursive task program example, where I am > creating a parent argobot task which creates two child argobots tasks and > then waits for them by calling ABT_task_free(). When I run this program > with one xstream I find that it doesn't terminate. *(Code snippet - * > https://gist.github.com/raghav0307/9252fc7b568bc35baab29bdc9da70618* )* > > My understanding is that this is because the parent task never yields the > xstream to the child tasks, and hence the program gets stuck. > > This program terminates when I use argobot threads instead of > argobot tasks. Could someone point me to why this is not working with > argobot tasks? > > Best, > Raghav > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shintaro.iwasaki.work at gmail.com Thu Oct 7 14:08:32 2021 From: shintaro.iwasaki.work at gmail.com (Shintaro Iwasaki) Date: Thu, 7 Oct 2021 12:08:32 -0700 Subject: [argobots-discuss] Writing recursive task parallel program with argobots In-Reply-To: References: Message-ID: Hi Raghav, Thank you for using Argobots! Yes, in this case, please use ABT_thread. I understand that the naming is extremely confusing, but ABT_thread (=user-level threads) works as a task in typical HPC fine-grained task-parallel programs. Other libraries used for task parallel programs also use "threads" for task implementations (Qthreads, MassiveThreads, ...). You can consider ABT_task (=tasklet) as a special user-level thread that cannot yield. The Argobots paper (Argobots: A Lightweight Low-Level Threading and Tasking Framework) describes the details. If you have any further questions, please feel free to ask here! Thanks, Shintaro On Thu, Oct 7, 2021 at 11:28 AM Raghav Gupta via discuss < discuss at lists.argobots.org> wrote: > Pasting the code snippet link again without any formatting - > https://gist.github.com/raghav0307/9252fc7b568bc35baab29bdc9da70618 > > On Thu, Oct 7, 2021 at 11:55 PM Raghav Gupta > wrote: > >> Hi, >> >> I am trying to use argobots for writing a recursive task parallel >> program. >> >> I have taken a very simple recursive task program example, where I am >> creating a parent argobot task which creates two child argobots tasks and >> then waits for them by calling ABT_task_free(). When I run this program >> with one xstream I find that it doesn't terminate. *(Code snippet - * >> https://gist.github.com/raghav0307/9252fc7b568bc35baab29bdc9da70618* )* >> >> My understanding is that this is because the parent task never yields the >> xstream to the child tasks, and hence the program gets stuck. >> >> This program terminates when I use argobot threads instead of >> argobot tasks. Could someone point me to why this is not working with >> argobot tasks? >> >> Best, >> Raghav >> > _______________________________________________ > discuss mailing list > discuss at lists.argobots.org > https://lists.argobots.org/mailman/listinfo/discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: