Re: [sage-support] Re: Number of CPUs?

2010-09-03 Thread didier deshommes
On Fri, Sep 3, 2010 at 8:01 PM, Simon King wrote: > Hi David, > > On 4 Sep., 01:53, "Dr. David Kirkby" wrote: >> Is SAGE_NCPUS used anywhere? > > Well, I was not suggesting to introduce an environment variable that > is used anywhere in Sage except to "tame" my test script. Of course, > if there

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Simon King
Hi David, On 4 Sep., 01:53, "Dr. David Kirkby" wrote: > Is SAGE_NCPUS used anywhere? Well, I was not suggesting to introduce an environment variable that is used anywhere in Sage except to "tame" my test script. Of course, if there already is an environment variable that provides what I need, I'

Re: [sage-support] Re: Number of CPUs?

2010-09-03 Thread Dr. David Kirkby
On 09/ 4/10 12:10 AM, Simon King wrote: Hi David! On 4 Sep., 01:01, "Dr. David Kirkby" 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 res

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Nils Bruin
On Sep 3, 11:13 am, Simon King wrote: > Probably not. I guess what I am asking is whether the functionality of > the sage-test script is available as a function that can be imported > into sage. Since up to now no-one seems to be able to answer that question, I'll speculate. Given what it's suppo

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Simon King
Hi David! On 4 Sep., 01:01, "Dr. David Kirkby" 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, then I'd probably use something

Re: [sage-support] Re: Number of CPUs?

2010-09-03 Thread Dr. David Kirkby
On 09/ 3/10 07:00 PM, John H Palmieri wrote: On Sep 3, 10:47 am, Simon King wrote: I'd like to restrict @parallel(ncpus=...), where "..." is something like 1/2 (or 1/3?) of the available CPUs. But how can I determine this number? From sage (or python): sage: import multiprocessing

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Simon King
Hi Didier and John! On 3 Sep., 20:02, didier deshommes wrote: > > Besides, a while ago I asked how one can execute the sage test script > > on a string, *without* saving that string into a file and *without* > > forking a "sage -t" subprocess. Do you see a way? > > Sounds like you want eval()? Th

[sage-support] Re: Number of CPUs?

2010-09-03 Thread John H Palmieri
On Sep 3, 10:47 am, Simon King wrote: > Hi! > > I have a list of computations (in fact, a test suite), and I'd like to > do them in parallel. Of course, I could use @parallel, but: >   1) each computation uses 3 processes (Sage, GAP, Singular) >   2) it is probably not nice to other users if paral

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Simon King
Hi! I guess I can answer the question about number of cpus myself (google was my friend, after all...): import multiprocessing multiprocessing.cpu_count() However, I'd appreciate to get an answer to the "sage -t" question. Cheers, Simon -- To post to this group, send email to sage-support