Bill Allombert on Tue, 22 Jan 2019 23:09:22 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
gp timers # and ## in parallel mode |
Dear PARI developers, I have update the display of the gp timers # and ## in parallel GP to print both the CPU time and the real time. This give a more useful information. For example with mt=pthread with 4 threads ? # timer = 1 (on) ? sizebyte(polmodular(101)) cpu time = 9,296 ms, real time = 2,641 ms. %1 = 5538416 In this case the CPU time is the total CPU time for all threads. We see that the cpu time is about 4 time the real time. Since my laptop has only 2 physical cores, the cpu time is about twice the value with pthread disabled. Now with mt=mpi with 5 threads: ? sizebyte(polmodular(101)) %1 = 5538416 ? ## *** last result: cpu time 1,480 ms, real time 3,686 ms. In this case the CPU time is only the CPU time of the main thread. Since most of the work is done in the secondary threads, we see that the CPU time is smaller than the real time in this case. Cheers, Bill