Parallel versions of the ECM and MPQS integer factorisation algorithm
are available since V2.27. One can simply use SetNthreads(t); to
select t threads on the local node, and optionally use StartWorkers
to include workers on other nodes. Then integer factorisation will
automatically use the parallel versions when the integers are large
enough for the ECM or MPQS algorithms to be selected.
The following code factors 10 random 80-digit integers using 32 threads
on the local manager node, and 32 threads on the worker node2.
> SetNthreads(32);
> StartWorkers("node2", 32); // start worker with 32 threads on node2
> SetVerbose("Factorization", 1);
> SetVerbose("MPQS",1);
> for i := 1 to 10 do
> n := Random(10^80);
> time Factorisation(n);
> end for;
[Next][Prev] [Right] [Left] [Up] [Index] [Root]