Languages

Menu
Sites
Language
Tizen OpenMP support

Hi,

I am currently using tizen 4, and I want to do some experiment with OpenMP. I was to build my hello_world sample using native code.

The OpenMP seems to be detected, but when I try to run my binary on the device directly (Not using a tpk). Not matter the num_thread I try to use it's always using only one thread.

My device is Raspberry PI 3, I should be able to use 4 thread without any issue. 

Is there some kind of limitation regarding openmp ??

Thanks

 

 

Responses

6 Replies
Shaswati Saha

Would you please try disabling dynamic teams explicitly using below line of code?

omp_set_dynamic(0);

After that, try setting number of threads as below:

omp_set_num_threads(4);

 

Anthony Liot

Hi,


I just try your suggestion but it's not working it keep using one thread.

My sample is a basic hello world for openmp not doing much.

Any other suggestion ??

THanks

 

 

 

 

Anthony Liot

Hi,


I just try your suggestion but it's not working it keep using one thread.

My sample is a basic hello world for openmp not doing much.

Any other suggestion ??

THanks

 

 

 

 

Yasin Ali

According to Tizen site https://developer.tizen.org/dev-guide/tizen-iot/group__OPENSRC__OPENMP__FRAMEWORK.html

Version: GCC 6.2.1 (OpenMP 4.5 supported)

is supported. What is your version?

Anthony Liot

Hi @yasin,

There is no doubt OpenMP is available, otherwise I will not able to build or if the device do not have openmp for some reason, I will have some failed running it because it will not found the gomp.so

Here the trouble is everything build and run fine, but the purpose of openmp is to be able to use multicore to parralize. But on my device same if I force to used 4 thread is always use just one.

Here the sample code I am using :

int main() {

 

    MTestTitle("OPENMP Testing");

    omp_set_dynamic(0);

    omp_set_num_threads(4);

    omp_set_max_active_levels(4);

    {

        #pragma omp parallel

        MTestResultLog("OPENMP:Thread Number (" + std::to_string(omp_get_num_threads()) + ")",

                       omp_get_thread_num(),  MTLLevel_0);

    }

 

    MTestTitle("OPENMP Testing"true);

 

    return EXIT_SUCCESS;

}