[Bug libgomp/37586] OpenMP thinks that I have 1 processor on an 8 processor pc

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Sep 20 08:24:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list