Re: getting processor numbers
From: Paul Jackson
Date: Tue Apr 03 2007 - 22:59:07 EST
Ulrich wrote:
> But all this of course does not solve the issue sysconf() has. In
> sysconf we cannot use sched_getaffinity since all the systems CPUs must
> be reported.
Good point. Yes, sysconf(_SC_NPROCESSORS_CONF) really needs to continue
returning the number of CPUs online, to maintain compatibility with the
current implementation, and because with a name like that, just about
anything else would be "surprising".
And OpenMPI shouldn't be calling sysconf(_SC_NPROCESSORS_CONF), as it does
not want to know how much hardware is there, but rather how much hardware
it is allowed to use. Something based on sched_getaffinity() would seem
to be ideal for its purposes.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/