tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD # actual cores



On 1/4/24 10:27, Jörn Clausen wrote:
Maybe hwloc (https://www.open-mpi.org/projects/hwloc/ <https://www.open-mpi.org/projects/hwloc/>) helps? The version in pkgsrc (parallel/hwloc) is quite outdated, but I guess it should run out of the box.

On Thu, Jan 4, 2024 at 3:14 PM Jason Bacon <jtocino%gmx.com@localhost <mailto:jtocino%gmx.com@localhost>> wrote:


    Does anyone know how to get the number of complete cores on a
    hyperthreaded CPU under NetBSD?

    On FreeBSD it's sysctl kern.smp.cores.
    On Darwin it's sysctl hw.physicalcpu.

    I'm not seeing an equivalent on NetBSD.  hw.ncpu reports total
    hyperthreads, as it does on the other platforms.

    I need this to fix py-joblib, where upstream lacks support for BSDs.

    Thanks...



--
Joern Clausen
https://www.oe-files.de/photography/ <https://www.oe-files.de/photography/>

Yeah, I ported hwloc. It might be a viable workaround, but also a hefty dependency for something that's quick and easy on most popular platforms.

Home | Main Index | Thread Index | Old Index