omp_get_thread_num always return 0

General OpenMP discussion
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help:
Posts: 1
Joined: Mon Dec 16, 2019 4:23 am

omp_get_thread_num always return 0

Post by flywang »

I use ndk-r20 complied my openmp code,omp_get_thread_num always return 0.
omp_get_num_procs return 8.but,I use ndk-r14 to complied,no issues found.
Envirment:Android 9

Posts: 808
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh

Re: omp_get_thread_num always return 0

Post by MarkB »

Can you post a minimal example code that shows the behaviour? What compiler flags are you using and how do you set the number of threads?