nproc

package
v1.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package nproc provides number of processors using slurm env var SLURM_CPUS_PER_TASK or runtime.NumCPU().

TODO: move this to dmem package once that is started.

Index

Constants

This section is empty.

Variables

View Source
var NumCPUCache int

Functions

func NumCPU

func NumCPU() int

func ThreadNs

func ThreadNs(ncpu, njobs int) (nthrs, nper, rmdr int)

ThreadNs computes number of threads and number of jobs per thread, based on number of cpu's and total number of jobs. rmdr is remainder of jobs not evenly divisible by ncpu

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL