Sign in to follow this  
Followers 0
Misery

Does omp_set_num_threads() works globally?

2 posts in this topic

Hi there,

 

I am writing a code that cosists of many different functions using OpenMP. I wonder if there is a good way to set number of used threads once.

Can O do this using omp_set_num_threads()? Or I need to call it in every function that uses OpenMP?

 

Thanks in advance,

Misery

0

Share this post


Link to post
Share on other sites

I believe it's global, but this kind of thing is trivial to test...

 

I did test it and it seems global. But since the documentation is (gently speaking) - a bit unsufficient, I thought I'd ask, to avoid stepping on a mine after writing next 10k lines of code :]

 

Thanks!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0