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: 20 Sep 2008 08:22:46 -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 #5 from jakub at gcc dot gnu dot org 2008-09-20 08:22 -------
No, I didn't mean to ask you to try to work around it, I asked you to
investigate why omp_get_num_procs returns 1 instead of 8. The gcc 4.3 vs. 4.4
difference only affects omp_get_max_threads, not omp_get_num_procs, so even
omp_get_num_procs reports 1, the options are 1) the process has affinity set to
just one CPU 2) GOMP_CPU_AFFINITY has been used 3) you have omp_get_num_procs
defined elsewhere in your program, verify that libgomp function is really used.
strace -f -e sched_getaffinity dump of the program could reveal 1), 2) can be
determined by looking at the scripts you use to start the program (or by adding
getenv call in the program to print that for you), 3) can be seen in the
debugger and/or by using LD_DEBUG=all env var.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37586