Using extra cores in gmp?
Ronald Bruck Jr
bruck at usc.edu
Sat Mar 29 21:16:42 UTC 2014
Now that 12-core Intel processors are available (for a mind-boggling combined 24 cores on the right mobo), let me ask whether there are any experimental versions of gmp which can use this many cores. In particular, many of my operations are carried out to thousands of digits (though seldom more than 32000), and it would seem that multiplication and division would greatly benefit from multithreading. (Even lowly addition!)
As it turns out, most of my use of multiprecision wouldn't benefit much from such parallelism. Most of my uses involve (hundreds of) thousands of repetitions of a single suite of programs, and it's fine to launch 20 or so invocations at a time on single threads. Each individual program takes much longer to run than if gmp were multithreaded, but the time for the whole collection will be about the same (or even faster).
But I can foresee future situations where single invocations would be useful. I once thought that GPU's could accelerate computations, but I quickly discovered that these are largely memory-bound. Someone from Bailey's (competing) multiprecision group wrote me, several years ago, that THEY found the same, and thought the future was in the increasing number of cores.
What are the thoughts of the group?
More information about the gmp-discuss