This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- Comment #4 from rrpeter at sandia dot gov  2008-09-19 22:01 -------
Subject: Re:  OpenMP thinks that I have 1 processor
 on an 8 processor pc

jakub at gcc dot gnu dot org wrote:
> ------- 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
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
>   
Hi,

Do you mean that there might be a problem with gcc 4.3 with regards to 
the problem that I see,  but it may be fixed with gcc 4.4?

It appears to me that GOMP_CPU_AFFINITY allows you to force threads onto 
particular processors -- is this correct?  So are you suggesting that I 
could use GOMP_CPU_AFFINITY to sidestep this problem?  If so, I will try 
it Monday.

Thanks! Have a nice weekend!
Ralph


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37586


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]