This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/37586] OpenMP thinks that I have 1 processor on an 8 processor pc
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2008 21:45:14 -0000
- Subject: [Bug libgomp/37586] OpenMP thinks that I have 1 processor on an 8 processor pc
- References: <bug-37586-4376@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jakub at gcc dot gnu dot org 2008-09-19 21:45 -------
As already said in the openmp.org forum, omp_get_num_procs () will only return
smaller number than the number of system CPUs online, if GOMP_CPU_AFFINITY env
var is used, or if the calling process and/or thread has CPU affinity limited
to a subset of CPUs. You can just step through omp_get_num_procs () /
get_num_procs () routine and/or look at strace to see what is the case.
omp_get_max_threads () in 4.3 and earlier incorrectly adjusts for dyn_var etc.,
works like parallel region determines the number of threads if num_thread isn't
specified, only on the GCC trunk (4.4 and later) it returns the nthreads_var
ICV.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Keywords| |openmp
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37586