Load imbalance in MPIR_Reduce_redscat_gather
Hello, In the current implementation of Rabenseifner’s algorithm (MPIR_Reduce_redscat_gather) for MPI_Reduce there is a load imbalance across the processes. The reason is non-uniform distribution of count elements across pof2 processes on the reduce-scatter and the gather steps. The last process pof2-1 is loaded more than others: for (i=0; i<(pof2-1); i++) cnts[i] = count/pof2; cnts[pof2-1] = count - (count/pof2)*(pof2-1); For example, commsize = 13, count=13; pof2=8, cnts[0..6] = 1, cnts[7] = 6. commsize = 1600, count=100000; pof2=1024, cnts[0..1022] = 97, cnts[1023] = 769. In addition, initial calculation of the cnts[i] and disps[i], before reduce-scatter step, takes O(log(p)) time. Summation of the cnts[i] on each step of the reduce-scatter also takes O(log(p)) time. Storing the cnts[i] and displs[i] requires O(p) bytes of memory. I implemented a new version of MPIR_Reduce_redscat_gather following the description in the original papers [1, 2]. Input vectors are halving uniformly, without using of arrays cnts[i] and disps[i]. Thus, the memory consumption and computational complexity is reduced. [1] Rajeev Thakur, Rolf Rabenseifner and William Gropp. Optimization of Collective Communication Operations in MPICH // The Int. Journal of High Performance Computing Applications. Vol 19, Issue 1, pp. 49--66. [2] http://www.hlrs.de/mpi/myreduce.html. With best regards, Mikhail Kurnosov -- Computer Systems Department Siberian State University of Telecommunications and Information Sciences Address: 630102, 86 Kirova str., Novosibirsk, Russia WWW: www.mkurnosov.net
participants (1)
-
Mikhail Kurnosov