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

OpenMP Test should set omp_set_num_threads to 1 #4

Closed
mcolg opened this issue Apr 16, 2015 · 4 comments
Closed

OpenMP Test should set omp_set_num_threads to 1 #4

mcolg opened this issue Apr 16, 2015 · 4 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)

Comments

@mcolg
Copy link

mcolg commented Apr 16, 2015

When testing Kokkos with pgc++, the following test case fails:

static void TearDownTestCase()
{
Kokkos::OpenMP::finalize();
omp_set_num_threads(0);
ASSERT_EQ( 1 , omp_get_max_threads() );
}

PGI returns "0" from omp_get_max_threads since that is what is set. If the expected result is "1", shouldn't omp_set_num_threads be set to "1"?

@mhoemmen
Copy link
Contributor

OpenMP 4.0 standard, Section 3.2.1 (omp_set_num_threads) says that "[t]he value of the argument passed to this routine must evaluate to a positive integer, or else the behavior of this routine is implementation defined."

Thus, this is not a valid test. Does it work when the input argument is 1?

mfh

On 4/16/15, 2:37 PM, "mcolg" <notifications@github.commailto:notifications@github.com> wrote:

When testing Kokkos with pgc++, the following test case fails:

static void TearDownTestCase()
{
Kokkos::OpenMP::finalize();
omp_set_num_threads(0);
ASSERT_EQ( 1 , omp_get_max_threads() );
}

PGI returns "0" from omp_get_max_threads since that is what is set. If the expected result is "1", shouldn't omp_set_num_threads be set to "1"?

Reply to this email directly or view it on GitHubhttps://github.com//issues/4.

@crtrott
Copy link
Member

crtrott commented Apr 16, 2015

Yeah we tested it. Doing omp_set_num_threads(1) should work. We'll fix that asap.

@crtrott crtrott added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Apr 16, 2015
@crtrott
Copy link
Member

crtrott commented Apr 20, 2015

I pushed a fix. Can you please test and confirm that it works for you?

@crtrott
Copy link
Member

crtrott commented Apr 21, 2015

I close this for now since I believe its fixed. Please let me know if that is not true.

@crtrott crtrott closed this as completed Apr 21, 2015
@crtrott crtrott self-assigned this Sep 20, 2016
Rombur referenced this issue in Rombur/kokkos May 16, 2019
masterleinad referenced this issue in masterleinad/kokkos Sep 23, 2020
Added trivial check define to Kokkos_SYCL.hpp and call from Kernel La…
dalg24 pushed a commit that referenced this issue Apr 12, 2022
* Add test for backwards compatible join() detection

* Remove names of unused parameters to quiet warnings

* Mark as device/inline to be right-er and maybe suppress unused function warning
tkordenbrock added a commit to tkordenbrock/kokkos that referenced this issue Jan 6, 2023
- resize the DynamicView to the current test size
- fix verification calculation
tkordenbrock added a commit to tkordenbrock/kokkos that referenced this issue Jan 6, 2023
- resize the DynamicView to the current test size
- fix verification calculation
crtrott pushed a commit that referenced this issue Jan 10, 2023
- resize the DynamicView to the current test size
- fix verification calculation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

3 participants