On 09/ 4/10 12:10 AM, Simon King wrote:
Hi David!

On 4 Sep., 01:01, "Dr. David Kirkby"<david.kir...@onetel.net>  wrote:
Be aware, that for hyperthreaded machines, the number of CPUs may exceed the
number of cores.

Ah. I guess that I wanted the number of cores. If, as you say, half
the CPUs is enough to occupy all resources,

It depends on the machine. I have here a couple of quad processor machines, which only have one core. So in that case, to use all resources one would use 4 threads.

In the case of machine with 2 or more threads per core, you will use a very large fraction of the resources by simply using the number of cores.


then I'd probably use
something like
   @parallel(ncpus=os.environ.get('SAGE_NCPUS') or 2)
so that at most 2 (or another small number) parallel processes are
created, unless the user requires otherwise, by setting an environment
variable.

Cheers,
Simon

Is SAGE_NCPUS used anywhere?

I think SAGE_NUMBER_THREADS is more useful. Someone had proposed SAGE_NUMBER_THREADS_atlas would override a default value and work for ATLAS only. So you could have SAGE_NUMBER_THREADS_gap or something like that. So there would be

SAGE_NUMBER_THREADS   # For everything unless one of these below is set
SAGE_NUMBER_THREADS_gap
SAGE_NUMBER_THREADS_atlas
etc etc

I don't think we have actually used any of this yet.

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to