Skip to content
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

#pragma omp parallel for is not following round robin rule #60

Open
tianyizhangcs opened this issue Oct 16, 2019 · 0 comments
Open

#pragma omp parallel for is not following round robin rule #60

tianyizhangcs opened this issue Oct 16, 2019 · 0 comments

Comments

@tianyizhangcs
Copy link
Member

omp_set_num_threads(5);

#pragma omp parallel for
for (i = 0; i < 6; i++)
{
printf("Hello World #%d, From thread %d\n ", i, omp_get_thread_num());
result_1[i] = i;
}

hpxmp result:
Hello World #0, From thread 0
Hello World #4, From thread 2
Hello World #5, From thread 2
Hello World #1, From thread 0
Hello World #2, From thread 1
Hello World #3, From thread 1

openmp result:
Hello World #0, From thread 0
Hello World #2, From thread 1
Hello World #3, From thread 2
Hello World #1, From thread 0
Hello World #5, From thread 4
Hello World #4, From thread 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant