Ask Your Question
1

Do Sage distribution binaries support running on multiple cores?

asked 2018-04-23 22:59:47 -0500

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
1

answered 2018-04-24 14:46:39 -0500

tmonteil gravatar image

updated 2018-04-24 15:14:01 -0500

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
1

answered 2018-04-24 07:29:30 -0500

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

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

Stats

Asked: 2018-04-23 22:59:47 -0500

Seen: 63 times

Last updated: Apr 24