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

looks like OMP nthreads is off-by-one #5

Open
naughtont3 opened this issue Jan 3, 2018 · 0 comments
Open

looks like OMP nthreads is off-by-one #5

naughtont3 opened this issue Jan 3, 2018 · 0 comments

Comments

@naughtont3
Copy link
Collaborator

I just ran a test against the latest gv_pmix branch and noticed that the omp_get_thread_num() returns one less than expected. For example, if NumCpus=12 and NumRanks=2, would expect to have 6 threads but instead we get 5 threads.

  [PID:1037] DBG: LINE:1780 nthreads=5, _n_local_cpus=12, _n_local_ranks=2
  [PID:1036] DBG: LINE:1780 nthreads=5, _n_local_cpus=12, _n_local_ranks=2
 ...<snip>...
  [mpi_omp_hello.c:main:48] In parallel loop: calling omp_get_thread_num()...
  [mpi_omp_hello.c:main:50] omp_get_thread_num() succeeded
  Number of threads = 5

Looks like this is related to kmp_runtime.cpp#L1779.

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