View Single Post
Old 2020-03-08, 19:57   #26
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

10110101010112 Posts
Default "Poor man's multithreading" and TF_CLASSES

Quote:
Originally Posted by kriesel View Post
Program output for help is
"Poor man's multithreading" is running multiple processes for the same bit level and exponent, with different passmin and passmax. For example, 4-way, to use 4 cores with an msys2 compiled image,
passmin 0 passmin 3,
passmin 4 passmax 7,
passmin 8 passmax 11,
passmin 12 passmax 15.
This works well for powers of two passes per run. 2,4,8,16.

If the build is done with -DTF_CLASSES=4620 for finer pass granularity, then passmin and passmax ranges become 0 to 959, 960 = 26 * 3 * 5 in number. This larger number of passes with numerous small factors allows for much more choice of degree of parallelism.
1,2,3,4,5,6,8,10,12,15,16,20,24,30, 32,40,48,60,64,80,96,120,160,192,240,320,480,960
For brief runs there is no point to going to high degrees of parallelism, and -DTF_CLASSES seems to introduce higher overhead into a single run. For lengthy runs, the only way to get run times reasonable may be high degrees of parallelism. Using hyperthreading helps.

Last fiddled with by kriesel on 2020-03-08 at 20:00
kriesel is online now   Reply With Quote