William Stein wrote:
On Wed, Jan 13, 2010 at 12:42 AM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
Can someone give me a Sage command to type that can exploit multiple
processors, which I can then time? (I'm not a Sage user really, just helping
port it to Solaris, so don't rely on me knowing python).

Ideally a floating point and an integer example would be good.

Here is an example:

sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=24)
CPU times: user 5.61 s, sys: 0.09 s, total: 5.70 s
Wall time: 0.82 s

Just to emphasize -- it's wall time that matters.


Em, best I could manage on t2 (in the global zone, so no CPU capping) was 24.25 s with 256 threads. That's twice the number of threads that t2 has (128).

That makes it 31 times slower than whatever you used!


In the zone on

http://t2nb.math.washington.edu:8000/

times are slightly longer, as the CPU usage is capped a bit.

Dave

kir...@t2:[~/sage-4.3] $ uname -a
SunOS t2 5.10 Generic_141414-02 sun4v sparc SUNW,T5240
kir...@t2:[~/sage-4.3] $ ./sage
----------------------------------------------------------------------
| Sage Version 4.3-patched-for-Solaris(SPARC), Built 2009-12-26      |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=1024)
CPU times: user 226.64 s, sys: 36.21 s, total: 262.86 s
Wall time: 24.56 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=512)
CPU times: user 225.75 s, sys: 38.95 s, total: 264.70 s
Wall time: 24.54 s
sage:  time b = bernoulli(10^5, algorithm='bernmm', num_threads=256)
CPU times: user 223.24 s, sys: 16.38 s, total: 239.62 s
Wall time: 24.25 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=128)
CPU times: user 219.54 s, sys: 6.95 s, total: 226.49 s
Wall time: 24.55 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=64)
CPU times: user 160.53 s, sys: 1.34 s, total: 161.87 s
Wall time: 24.53 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=32)
CPU times: user 130.78 s, sys: 0.14 s, total: 130.93 s
Wall time: 25.37 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=16)
CPU times: user 121.34 s, sys: 0.07 s, total: 121.41 s
Wall time: 27.56 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=8)
CPU times: user 119.47 s, sys: 0.03 s, total: 119.50 s
Wall time: 32.82 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=4)
CPU times: user 119.28 s, sys: 0.03 s, total: 119.32 s
Wall time: 44.08 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=2)
CPU times: user 119.16 s, sys: 0.02 s, total: 119.18 s
Wall time: 68.00 s
sage: time b = bernoulli(10^5, algorithm='bernmm', num_threads=1)
CPU times: user 118.64 s, sys: 0.01 s, total: 118.64 s
Wall time: 118.77 s



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

Reply via email to