<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class="">I am trying to emulate recurring service calls in OpenMP (similar to <br class="">what OmpSs-2 offers) in order to progress outstanding MPI operations. </blockquote><div class=""><br class=""></div>You may want to check out our IPDPS paper (<a href="https://ieeexplore.ieee.org/document/8425570" class="">Parallelizing MPI Using Tasks for Hybrid Programming Models</a><span style="font-size: large; color: rgb(51, 51, 51); font-family: sans-serif; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">)</span><div class="">on using OpenMP tasks in an MPI implementation, though I guess you may not be down inside the MPI library.</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class=""><div class="">Date: Wed, 15 Jul 2020 11:33:57 +0200<br class="">From: Joseph Schuchart via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" class="">openmp-dev@lists.llvm.org</a>><br class="">To: openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" class="">openmp-dev@lists.llvm.org</a>><br class="">Subject: [Openmp-dev] Using taskyield to emulate a background service<br class="">Message-ID: <<a href="mailto:b35cf7d0-751d-a45e-4112-0eca25ef1ad8@hlrs.de" class="">b35cf7d0-751d-a45e-4112-0eca25ef1ad8@hlrs.de</a>><br class="">Content-Type: text/plain; charset=utf-8; format=flowed<br class=""><br class="">Dear devs,<br class=""><br class="">I am trying to emulate recurring service calls in OpenMP (similar to <br class="">what OmpSs-2 offers) in order to progress outstanding MPI operations. My <br class="">attempt is to have one task executed by some thread that invokes the <br class="">progress service and calls taskyield to participate in the execution of <br class="">tasks generated by any of the other threads. The task's code is similar <br class="">to this snippet:<br class=""><br class=""> #pragma omp task shared(do_progress)<br class=""> {<br class=""> while(do_progress) {<br class=""> call_progress();<br class=""> #pragma omp taskyield<br class=""> }<br class=""> }<br class=""> }<br class=""><br class="">The variable `do_progress` is a volatile flag that is unset by another <br class="">thread once progress is not needed anymore.<br class=""><br class="">What I found is that the thread executing this service task does not <br class="">participating in the execution of available tasks from the other <br class="">threads. In other words, the yield does nothing. However, if I set <br class="">KMP_TASK_STEALING_CONSTRAINT=0 then the thread does participate in the <br class="">execution of tasks. All tasks are tied (because of issues with untied <br class="">tasks).<br class=""><br class="">Can someone tell me why taskyield does not steal tasks by default? Is <br class="">that related to the the fact that all tasks are tied?<br class=""><br class="">Many thanks!<br class=""><br class="">Cheers<br class="">Joseph<br class=""><br class="">-- <br class="">Dipl.-Inf. Joseph Schuchart<br class="">High Performance Computing Center Stuttgart (HLRS)<br class="">Nobelstr. 19<br class="">D-70569 Stuttgart<br class=""><br class="">Tel.: +49(0)711-68565890<br class="">Fax: +49(0)711-6856832<br class=""><a href="mailto:schuchart@hlrs.de" class="">E-Mail: schuchart@hlrs.de</a><br class=""><br class=""></div></div></blockquote></div><div class=""><br class=""></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">-- Jim<br class="">James Cownie <<a href="mailto:jcownie@gmail.com" class="">jcownie@gmail.com</a>><br class="">Mob: +44 780 637 7146<br class=""><br class=""><br class=""><br class=""></div></div>
</div>
<br class=""></div></div></body></html>