On 27 Mrz., 15:39, Volker Braun <vbraun.n...@gmail.com> wrote: > The current state is that we build static atlas with and without threads, > and the shared library without threads only. And our module_list.py links > with the single-threaded atlas shared library only. So Sage will use the > single-threaded version if you build atlas yourself.
leif@mod:~$ ls -l /usr/local/share/sage-4.8/local/lib/*atlas* -rw-r--r-- 1 sagemath sagemath 14336578 2012-02-15 13:31 /usr/local/ share/sage-4.8/local/lib/libatlas.a -rw-r--r-- 1 sagemath sagemath 9373372 2012-01-19 17:37 /usr/local/ share/sage-4.8/local/lib/libatlas.so leif@mod:~$ readelf -d /usr/local/share/sage-4.8/local/lib/ libatlas.so Dynamic section at offset 0x87e1d0 contains 21 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x000000000000000e (SONAME) Library soname: [libatlas.so] ... And what you say IMHO doesn't explain the problems we had, which definitely occurred only with *large* matrices (and bdists). Obviously there's some machine-specific threshold for multithreading, although multiplication of 1000x1000 matrices should probably already trigger it. -leif > If you use the os-provided atlas library (which can be multi-threaded yet > not have the "pt" in the name), you get parallel atlas. For example, on > Fedora I'm using the system atlas and get > > sage: sage: a = random_matrix(RDF,1000) > sage: time a*a > 1000 x 1000 dense matrix over Real Double Field > Time: CPU 1.08 s, Wall: 0.26 s > > And if anybody wonders why there is a single-threaded atlas at all: People > often specifically WANT a single-threaded blas, and implement their own > parallelism on top of that. > > > On Tuesday, March 27, 2012 2:14:26 PM UTC+1, William wrote: > > > On Tue, Mar 27, 2012 at 12:39 PM, Volker Braun <vbraun.n...@gmail.com> > > wrote: > > > When I rewrote the atlas spkg I enabled multithreaded atlas libraries. > > That > > > is, we configure atlas to allow threading. Whether or not atlas actually > > > builds threaded libraries depends on os and configure checks for > > ptthreads. > > > Does it work on mod.math.washington.edu? I tried > > > sage: a = random_matrix(RDF,1000) > > sage: time b = a*a > > Time: CPU 0.43 s, Wall: 0.43 s > > > and clearly ATLAS is *NOT* being multithreaded. > > However, if I do the same on my little OS X laptop, I get: > > > sage: a = random_matrix(RDF,1000) > > sage: time b = a*a > > Time: CPU 0.45 s, Wall: 0.13 s # <--- look at that walltime! > > > which is clearly multithreaded. > > > - William -- 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