ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 24 Apr 2018 14:46:39 -0500Do Sage distribution binaries support running on multiple cores?http://ask.sagemath.org/question/42145/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?Mon, 23 Apr 2018 22:59:47 -0500http://ask.sagemath.org/question/42145/do-sage-distribution-binaries-support-running-on-multiple-cores/Answer by tmonteil for <p>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?</p>
http://ask.sagemath.org/question/42145/do-sage-distribution-binaries-support-running-on-multiple-cores/?answer=42151#post-id-42151Note 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.Tue, 24 Apr 2018 14:46:39 -0500http://ask.sagemath.org/question/42145/do-sage-distribution-binaries-support-running-on-multiple-cores/?answer=42151#post-id-42151Answer by eric_g for <p>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?</p>
http://ask.sagemath.org/question/42145/do-sage-distribution-binaries-support-running-on-multiple-cores/?answer=42148#post-id-42148Some 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. Tue, 24 Apr 2018 07:29:30 -0500http://ask.sagemath.org/question/42145/do-sage-distribution-binaries-support-running-on-multiple-cores/?answer=42148#post-id-42148