General OpenMP discussion
Hi, can someone please tell me how to set the number of processors that will be used to run the paralleled program? I searched in the openmp website but couldn't find nothing...
and sorry about the bad english.
edit: i forgot to say... in fortran language please.
You can set the number of threads to be used with the environment variable OMP_NUM_THREADS. You can set the number of threads to be used for following parallel regions with omp_set_num_threads() . In Fortran you probably want to include 'omp.h' or use the module omp_lib (use omp_lib).
You cannot control the number of physical processors/cores available for OpenMP threads; that is a function of the operating system and its environment.
- Posts: 135
- Joined: Sun Oct 21, 2007 4:58 pm
- Location: OpenMP ARB
And changing a bit the question... can someone tell me how to set the number of physical processors/cores used to run a program in linux operating system?
and sorry again about the bad english.
Return to Using OpenMP
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot], Yahoo [Bot] and 4 guests