The nproc output is affected by the OMP_NUM_THREADS and OMP_THREAD_LIMIT
environment variables (except with the --all option). This is completely
unintuitive:
  * The short description of nproc ("print the number of processing
    units available" / "Print the number of available processors")
    does not even mention threading, for a good reason as it is not
    necessarily related to multithreading:
  * For instance, one may want to run several processes in parallel,
    each being set to single-threaded by using OMP_NUM_THREADS=1.

So the --help text (which also corresponds to the nproc(1) man page)
should mention the the effect of these environment variables.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)



Reply via email to