Re: getting processor numbers

Paul Jackson
2007-04-04T07:02:09Z

Jakub wrote:
> OpenMP wants (4) and I'll change it that way.

Good. Are you referring to a change in glibc or in OpenMP?

> sysconf(_SC_NPROCESSORS_ONLN) must return (3) (this currently scans /proc/stat)

Ok

> sysconf(_SC_NPROCESSORS_CONF) should IMHO return (2) (this currently
> scans /proc/cpuinfo on alpha and sparc{,64} for ((ncpus|CPUs) probed|cpus detected)
> and for the rest just returns sysconf(_SC_NPROCESSORS_ONLN)).

Not quite what I would have guessed, but seems ok.

Thanks for spelling this out.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401