Do Sage distribution binaries support running on multiple cores?

Running Sage for some complex matrix operations that take a long time to run. Looking at the system monitor it is pretty clear that Sage is only using 1 of 4 available cores on my processor. Is it possible with standard binaries (versus custom build) to have Sage use more than 1 core?

edit retag close merge delete

Sort by » oldest newest most voted

Some part of Sage are using multiprocessing, like tensor calculus on manifolds, which is turned on by Parallelism().set(nproc=n) where n is the number of (effective) cores in your CPU (this works with all versions of Sage, including the distribution binaries). But I am not sure if matrix operations use it.

more

Note that Sage relies on other systems for its computations. For example, matrices over RDF are handled by openblas, matrices over ZZ are handled by flint. So, in each case, we should see if there are compilaton options that allow that system to use all your cores. It will also depend on the method used, since some algorithms are more parallelisable than others. Hence, to provide a meaningful answr, it is necessary to know:

If M is your matrix, what is the answer of:

sage: parent(M)
sage: type(M)


and what are the methods that you want to run intensively ?

Note that, in the tests i just quickly did, while i am compiling Sage, i could only see one core work in various situations with various backends. But it does not means that there is nothing to do, it might be possible to allow some parallelism at compulation time.

more