@@ -76,7 +76,7 @@ static ompi_coll_portals4_tree_t*
7676ompi_coll_portals4_build_in_order_bmtree ( struct ompi_communicator_t * comm ,
7777 int root )
7878{
79- int childs = 0 , rank , vrank , vparent , size , mask = 1 , remote , i ;
79+ int childs = 0 , rank , vrank , vparent , size , mask = 1 , remote ;
8080 ompi_coll_portals4_tree_t * bmtree ;
8181
8282 /*
@@ -97,7 +97,7 @@ ompi_coll_portals4_build_in_order_bmtree( struct ompi_communicator_t* comm,
9797 bmtree -> tree_bmtree = 1 ;
9898 bmtree -> tree_root = MPI_UNDEFINED ;
9999 bmtree -> tree_nextsize = MPI_UNDEFINED ;
100- for (i = 0 ; i < MAXTREEFANOUT ;i ++ ) {
100+ for (int i = 0 ; i < MAXTREEFANOUT ; i ++ ) {
101101 bmtree -> tree_next [i ] = -1 ;
102102 }
103103
@@ -520,8 +520,6 @@ ompi_coll_portals4_gather_intra_binomial_top(const void *sbuf, int scount, struc
520520
521521 int vrank = -1 ;
522522
523- int32_t i = 0 ;
524-
525523 ompi_coll_portals4_tree_t * bmtree ;
526524
527525 int32_t expected_ops = 0 ;
@@ -606,7 +604,7 @@ ompi_coll_portals4_gather_intra_binomial_top(const void *sbuf, int scount, struc
606604 "%s:%d: packed_size=%lu, fragment_size=%lu" ,
607605 __FILE__ , __LINE__ , request -> u .gather .packed_size , mca_coll_portals4_component .ni_limits .max_msg_size ));
608606
609- for (int i = 0 ; i < bmtree -> tree_nextsize ; i ++ ) {
607+ for (int i = 0 ; i < bmtree -> tree_nextsize ; i ++ ) {
610608 int child_vrank = VRANK (bmtree -> tree_next [i ], request -> u .gather .root_rank , request -> u .gather .size );
611609 int sub_tree_size = get_tree_numdescendants_of (comm , child_vrank ) + 1 ;
612610 ptl_size_t local_number_of_fragment = ((sub_tree_size * request -> u .gather .packed_size ) + mca_coll_portals4_component .ni_limits .max_msg_size - 1 ) / mca_coll_portals4_component .ni_limits .max_msg_size ;
@@ -688,7 +686,7 @@ ompi_coll_portals4_gather_intra_binomial_top(const void *sbuf, int scount, struc
688686 /************************************/
689687 /* put Recv-ACK to each child */
690688 /************************************/
691- for (i = 0 ; i < bmtree -> tree_nextsize ;i ++ ) {
689+ for (int i = 0 ; i < bmtree -> tree_nextsize ; i ++ ) {
692690 int32_t child = bmtree -> tree_next [i ];
693691 ret = PtlTriggeredPut (request -> u .gather .sync_mdh ,
694692 0 ,
@@ -730,7 +728,7 @@ ompi_coll_portals4_gather_intra_binomial_top(const void *sbuf, int scount, struc
730728 /**********************************/
731729 /* put RTR to each child */
732730 /**********************************/
733- for (i = 0 ; i < bmtree -> tree_nextsize ;i ++ ) {
731+ for (int i = 0 ; i < bmtree -> tree_nextsize ; i ++ ) {
734732 int32_t child = bmtree -> tree_next [i ];
735733 ret = PtlTriggeredPut (request -> u .gather .sync_mdh ,
736734 0 ,
@@ -750,7 +748,7 @@ ompi_coll_portals4_gather_intra_binomial_top(const void *sbuf, int scount, struc
750748 /**********************************/
751749 /* put RTR to each child */
752750 /**********************************/
753- for (i = 0 ; i < bmtree -> tree_nextsize ;i ++ ) {
751+ for (int i = 0 ; i < bmtree -> tree_nextsize ; i ++ ) {
754752 int32_t child = bmtree -> tree_next [i ];
755753 ret = PtlPut (request -> u .gather .sync_mdh ,
756754 0 ,
@@ -818,8 +816,6 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
818816
819817 int8_t i_am_root ;
820818
821- int32_t i = 0 ;
822-
823819 int32_t expected_ops = 0 ;
824820 int32_t expected_acks = 0 ;
825821
@@ -975,7 +971,7 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
975971 /* root puts Recv-ACK to all other ranks */
976972 /*****************************************/
977973 if (i_am_root ) {
978- for (i = 0 ; i < request -> u .gather .size ;i ++ ) {
974+ for (int i = 0 ; i < request -> u .gather .size ; i ++ ) {
979975 if (i == request -> u .gather .root_rank ) { continue ; }
980976 ret = PtlTriggeredPut (request -> u .gather .sync_mdh ,
981977 0 ,
@@ -1019,7 +1015,7 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
10191015 /* root puts RTR to all other ranks */
10201016 /************************************/
10211017 if (i_am_root ) {
1022- for (i = 0 ; i < request -> u .gather .size ;i ++ ) {
1018+ for (int i = 0 ; i < request -> u .gather .size ; i ++ ) {
10231019 if (i == request -> u .gather .root_rank ) { continue ; }
10241020 ret = PtlTriggeredPut (request -> u .gather .sync_mdh ,
10251021 0 ,
@@ -1041,7 +1037,7 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
10411037 /* root puts RTR to all other ranks */
10421038 /************************************/
10431039 if (i_am_root ) {
1044- for (i = 0 ; i < request -> u .gather .size ;i ++ ) {
1040+ for (int i = 0 ; i < request -> u .gather .size ; i ++ ) {
10451041 if (i == request -> u .gather .root_rank ) { continue ; }
10461042 ret = PtlPut (request -> u .gather .sync_mdh ,
10471043 0 ,
@@ -1093,7 +1089,6 @@ ompi_coll_portals4_gather_intra_binomial_bottom(struct ompi_communicator_t *comm
10931089 ompi_coll_portals4_request_t * request )
10941090{
10951091 int ret , line ;
1096- int i ;
10971092
10981093 OPAL_OUTPUT_VERBOSE ((10 , ompi_coll_base_framework .framework_output ,
10991094 "coll:portals4:gather_intra_binomial_bottom enter rank %d" , request -> u .gather .my_rank ));
@@ -1109,7 +1104,7 @@ ompi_coll_portals4_gather_intra_binomial_bottom(struct ompi_communicator_t *comm
11091104 struct iovec iov ;
11101105 size_t max_data ;
11111106
1112- for (i = 0 ; i < request -> u .gather .size ;i ++ ) {
1107+ for (int i = 0 ; i < request -> u .gather .size ; i ++ ) {
11131108 uint64_t offset = request -> u .gather .unpack_dst_extent * request -> u .gather .unpack_dst_count * ((request -> u .gather .my_rank + i ) % request -> u .gather .size );
11141109
11151110 opal_output_verbose (30 , ompi_coll_base_framework .framework_output ,
@@ -1161,7 +1156,6 @@ ompi_coll_portals4_gather_intra_linear_bottom(struct ompi_communicator_t *comm,
11611156 ompi_coll_portals4_request_t * request )
11621157{
11631158 int ret , line ;
1164- int i ;
11651159
11661160 OPAL_OUTPUT_VERBOSE ((10 , ompi_coll_base_framework .framework_output ,
11671161 "coll:portals4:gather_intra_linear_bottom enter rank %d" , request -> u .gather .my_rank ));
@@ -1177,7 +1171,7 @@ ompi_coll_portals4_gather_intra_linear_bottom(struct ompi_communicator_t *comm,
11771171 struct iovec iov ;
11781172 size_t max_data ;
11791173
1180- for (i = 0 ; i < request -> u .gather .size ;i ++ ) {
1174+ for (int i = 0 ; i < request -> u .gather .size ; i ++ ) {
11811175 ompi_coll_portals4_create_recv_converter (& request -> u .gather .recv_converter ,
11821176 request -> u .gather .unpack_dst_buf + (request -> u .gather .unpack_dst_extent * request -> u .gather .unpack_dst_count * i ),
11831177 ompi_comm_peer_lookup (comm , request -> u .gather .my_rank ),
0 commit comments