5252 * Example on 6 nodes:
5353 * Initialization: everyone has its own buffer at location 0 in rbuf
5454 * This means if user specified MPI_IN_PLACE for sendbuf
55- * we must copy our block from recvbuf to begining !
55+ * we must copy our block from recvbuf to beginning !
5656 * # 0 1 2 3 4 5
5757 * [0] [1] [2] [3] [4] [5]
5858 * Step 0: send message to (rank - 2^0), receive message from (rank + 2^0)
@@ -124,7 +124,7 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
124124 /* Communication step:
125125 At every step i, rank r:
126126 - doubles the distance
127- - sends message which starts at begining of rbuf and has size
127+ - sends message which starts at beginning of rbuf and has size
128128 (blockcount * rcount) to rank (r - distance)
129129 - receives message of size blockcount * rcount from rank (r + distance)
130130 at location (rbuf + distance * rcount * rext)
@@ -159,10 +159,10 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
159159 /* Finalization step:
160160 On all nodes except 0, data needs to be shifted locally:
161161 - create temporary shift buffer,
162- see discussion in coll_basic_reduce.c about the size and begining
162+ see discussion in coll_basic_reduce.c about the size and beginning
163163 of temporary buffer.
164164 - copy blocks [0 .. (size - rank - 1)] from rbuf to shift buffer
165- - move blocks [(size - rank) .. size] from rbuf to begining of rbuf
165+ - move blocks [(size - rank) .. size] from rbuf to beginning of rbuf
166166 - copy blocks from shift buffer starting at block [rank] in rbuf.
167167 */
168168 if (0 != rank ) {
@@ -182,7 +182,7 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
182182 shift_buf , rbuf );
183183 if (err < 0 ) { line = __LINE__ ; free (free_buf ); goto err_hndl ; }
184184
185- /* 2. move blocks [(size - rank) .. size] from rbuf to the begining of rbuf */
185+ /* 2. move blocks [(size - rank) .. size] from rbuf to the beginning of rbuf */
186186 tmpsend = (char * ) rbuf + (ptrdiff_t )(size - rank ) * (ptrdiff_t )rcount * rext ;
187187 err = ompi_datatype_copy_content_same_ddt (rdtype , (ptrdiff_t )rank * (ptrdiff_t )rcount ,
188188 rbuf , tmpsend );
@@ -532,7 +532,7 @@ int ompi_coll_base_allgather_intra_ring(const void *sbuf, int scount,
532532 [(r - i - 1 + size) % size]
533533 - sends message to rank [(r + 1) % size] containing data from rank
534534 [(r - i + size) % size]
535- - sends message which starts at begining of rbuf and has size
535+ - sends message which starts at beginning of rbuf and has size
536536 */
537537 sendto = (rank + 1 ) % size ;
538538 recvfrom = (rank - 1 + size ) % size ;
@@ -685,7 +685,7 @@ ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, int scount,
685685 - Rest of the steps:
686686 update recv_data_from according to offset, and
687687 exchange two blocks with appropriate neighbor.
688- the send location becomes previous receve location.
688+ the send location becomes previous receive location.
689689 */
690690 tmprecv = (char * )rbuf + (ptrdiff_t )neighbor [0 ] * (ptrdiff_t )rcount * rext ;
691691 tmpsend = (char * )rbuf + (ptrdiff_t )rank * (ptrdiff_t )rcount * rext ;
0 commit comments