Jump to content

  • Log In with Google      Sign In   
  • Create Account


Does omp_set_num_threads() works globally?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Misery   Members   -  Reputation: 247

Like
0Likes
Like

Posted 29 March 2013 - 10:17 AM

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



Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 10629

Like
2Likes
Like

Posted 29 March 2013 - 07:39 PM

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

#3 Misery   Members   -  Reputation: 247

Like
0Likes
Like

Posted 30 March 2013 - 12:25 AM

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!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS