@@ -1695,7 +1695,7 @@ PREFIX (send) (caf_token_t token, size_t offset, int image_index,
16951695 gfc_descriptor_t * dest ,
16961696 caf_vector_t * dst_vector __attribute__ ((unused )),
16971697 gfc_descriptor_t * src , int dst_kind , int src_kind ,
1698- bool mrt , int * stat )
1698+ bool mrt , int * stat , void * team )
16991699{
17001700 /* FIXME: Implement vector subscripts, type conversion and check whether
17011701 string-kind conversions are permitted.
@@ -5190,7 +5190,7 @@ void PREFIX (form_team) (int team_id, caf_team_t *team, int index __attribute__
51905190 teams_list = tmp ;
51915191 teams_list -> team_id = team_id ;
51925192 teams_list -> team = newcomm ;
5193- * team = newcomm ;
5193+ * team = tmp ;
51945194}
51955195
51965196void PREFIX (change_team ) (caf_team_t * team , int coselector __attribute__ ((unused )))
@@ -5201,25 +5201,26 @@ void PREFIX (change_team) (caf_team_t *team, int coselector __attribute__ ((unus
52015201 MPI_Comm * tmp_comm ;
52025202
52035203 MPI_Barrier (CAF_COMM_WORLD );
5204- tmp_team = (void * )* team ;
5204+ tmp_list = (struct caf_teams_list * )* team ;
5205+ tmp_team = (void * )tmp_list -> team ;
52055206 tmp_comm = (MPI_Comm * )tmp_team ;
52065207
52075208 tmp_used = (caf_used_teams_list * )calloc (1 ,sizeof (caf_used_teams_list ));
52085209 tmp_used -> prev = used_teams ;
52095210
5210- /* We need to look in the teams_list and find the appropriate element.
5211- * This is not efficient but can be easily fixed in the future.
5212- * Instead of keeping track of the communicator in the compiler
5213- * we should keep track of the caf_teams_list element associated with it. */
5211+ /* /\* We need to look in the teams_list and find the appropriate element. */
5212+ /* * This is not efficient but can be easily fixed in the future. */
5213+ /* * Instead of keeping track of the communicator in the compiler */
5214+ /* * we should keep track of the caf_teams_list element associated with it. *\/ */
52145215
5215- tmp_list = teams_list ;
5216+ /* tmp_list = teams_list; */
52165217
5217- while (tmp_list )
5218- {
5219- if (tmp_list -> team == tmp_team )
5220- break ;
5221- tmp_list = tmp_list -> prev ;
5222- }
5218+ /* while(tmp_list) */
5219+ /* { */
5220+ /* if(tmp_list->team == tmp_team) */
5221+ /* break; */
5222+ /* tmp_list = tmp_list->prev; */
5223+ /* } */
52235224
52245225 if (tmp_list == NULL )
52255226 caf_runtime_error ("CHANGE TEAM called on a non-existing team" );
0 commit comments