[llvm-bugs] [Bug 33543] New: Problem with tasks, eating cpu cycle while idle

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 21 05:54:03 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33543

            Bug ID: 33543
           Summary: Problem with tasks, eating cpu cycle while idle
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Runtime Library
          Assignee: unassignedbugs at nondot.org
          Reporter: northon_patrick3 at yahoo.ca
                CC: llvm-bugs at lists.llvm.org

When creating tasks with #pragma omp task, threads not executing any tasks will
eat cpu cycles.

Minimal example:

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <thread>
#include <omp.h>

using namespace std::chrono_literals;

int main(int argc, char **argv)
{
        #pragma omp parallel
        {
                #pragma omp single
                {
                        #pragma omp task
                        {
                                std::this_thread::sleep_for(30s);
                        }

                        #pragma omp taskwait
                }
        }

        std::cout << "Done." << '\n';

        getchar();
        return 0;
}

My system is running Fedora 25.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170621/7b318884/attachment.html>


More information about the llvm-bugs mailing list