Ask Your Question

Do Sage distribution binaries support running on multiple cores?

asked 2018-04-24 05:59:47 +0200

BCWDave gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-04-24 14:29:30 +0200

eric_g gravatar image

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.

edit flag offensive delete link more

answered 2018-04-24 21:46:39 +0200

tmonteil gravatar image

updated 2018-04-24 22:14:01 +0200

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-04-24 05:59:47 +0200

Seen: 287 times

Last updated: Apr 24 '18