Opened 4 years ago

Last modified 4 years ago

#25779 closed defect

sage.parallel.ncpus.ncpus() reports wrong number of cores — at Version 2

Reported by: gh-lerouxje Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: scripts Keywords: parallel
Cc: saraedum Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by saraedum)

In recent docker images

docker run -it --rm sagemath/sagemath:latest sage
sage: sage.parallel.ncpus.ncpus()
1

in 8.0 this still returned the actual number of cores.

This seems to be unrelated to the fact that this is running in the docker image.

Change History (2)

comment:1 Changed 4 years ago by saraedum

If you just want to set the number of cores and ignore the automatic detection, you can do

$ docker run -e SAGE_NUM_THREADS=123 -it sagemath/sagemath sage -c 'print sage.parallel.ncpus.ncpus()'
Setting permissions of DOT_SAGE directory so only you can read and write it.
123
Last edited 4 years ago by saraedum (previous) (diff)

comment:2 Changed 4 years ago by saraedum

  • Component changed from PLEASE CHANGE to scripts
  • Description modified (diff)
  • Summary changed from Don't detect all cpus with last docker images of sagemath to sage.parallel.ncpus.ncpus() reports wrong number of cores
Note: See TracTickets for help on using tickets.