48 my_procrow = commGrid->GetRankInProcCol();
49 my_proccol = commGrid->GetRankInProcRow();
50 procrows = commGrid->GetGridRows();
51 proccols = commGrid->GetGridCols();
55 bm =
new BitMap(biggest_size);
56 recv_buff =
new BitMap(biggest_size);
57 old_bm =
new BitMap(biggest_size);
58 sub_disps =
new int[proccols];
59 sub_disps[my_proccol] = local_subword_disp;
60 MPI_Allgather(MPI_IN_PLACE, 1, MPI_INT, sub_disps, 1, MPI_INT, commGrid->GetRowWorld());
61 curr_subword_disp = local_subword_disp;
112 IT n_perprocrow = global_size / procrows;
114 if(my_procrow == procrows-1)
115 n_thisrow = global_size - (n_perprocrow*(procrows-1));
117 n_thisrow = n_perprocrow;
118 IT n_perproc = n_thisrow / proccols;
119 return ((n_perprocrow * my_procrow)+(n_perproc*my_proccol));
142 int source = (my_proccol+1) % proccols;
143 int dest = (my_proccol+(proccols-1)) % proccols;
144 rotation_index = (rotation_index + 1) % proccols;
145 long send_words = (local_size + 63 + curr_subword_disp)>>6;
146 long recv_words = (
SizeOfChunk() + 63 + sub_disps[(my_proccol+rotation_index)%proccols])>>6;
148 MPI_Comm RowWorld = commGrid->GetRowWorld();
155 std::swap(bm, recv_buff);
156 curr_subword_disp = sub_disps[(my_proccol+rotation_index)%proccols];