Some computations in the engine can run using multiple cores on your computer. Currently, this includes computation of minimal betti diagrams, non-minimal resolutions, and Groebner bases of 2-sided ideals in associative algebras, all in the graded case, over a finite field. Also included is (one of the algorithms for) the computation of Groebner bases in polynomial rings over finite fields, whether graded or not.
The variable numTBBThreads controls the number of cores used by Macaulay2. The default value (zero) means the system can choose an appropriate number of cores (often the maximum available). Note that the default behavior is to use multiple cores.
In minimalBetti, and in freeResolution with the Strategy => Nonminimal option, more aggressive parallelism that sometimes uses a lot of memory but can sometimes produce answers in less time can be enabled using the ParallelizeByDegree boolean option.
For examples, we show some simple examples of computation which, for larger size problems, might benefit from using parallelism. Note that in each of these cases, the default is to use all available CPU cores for computation. For these particularly simple examples, the overhead for using multiple cores is non-trivial with respect to the total computation time. Significant speedup is achieved when the time to gauss reduce the requisite matrices is large compared to creating these matrices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Groebner bases (based on a linear algebra method, e.g. Faugere's F4 algorithm, are also parallelized. Note: the MGB Strategy of groebnerBasis is not currently parallelized.
|
|
|
|
|
|
|
|
|
|
For Groebner basis computation in associative algebras, ParallelizeByDegree is not relevant. In this case, use numTBBThreads to control the amount of parallelism.
|
|
|
|
|
|
|
|