File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,7 @@ void PREFIX (fail_image) (void) __attribute__ ((noreturn));
287287void PREFIX (form_team ) (int , caf_team_t * , int );
288288void PREFIX (change_team ) (caf_team_t * , int );
289289void PREFIX (end_team ) (caf_team_t * );
290+ void PREFIX (sync_team ) (caf_team_t * , int );
290291
291292int PREFIX (image_status ) (int );
292293void PREFIX (failed_images ) (gfc_descriptor_t * , int , int * );
Original file line number Diff line number Diff line change @@ -5257,3 +5257,31 @@ void PREFIX (end_team) (caf_team_t *team __attribute__ ((unused)))
52575257 caf_this_image ++ ;
52585258 MPI_Comm_size (CAF_COMM_WORLD ,& caf_num_images );
52595259}
5260+
5261+ void PREFIX (sync_team ) (caf_team_t * team , int unused __attribute__ ((unused )))
5262+ {
5263+ caf_teams_list * tmp_list = NULL ;
5264+ caf_used_teams_list * tmp_used = NULL ;
5265+ void * tmp_team ;
5266+ MPI_Comm * tmp_comm ;
5267+
5268+ /* Check if the team is the current, and ancestor or a descendant. To be implemented. */
5269+
5270+ tmp_used = used_teams ;
5271+ tmp_list = (struct caf_teams_list * )* team ;
5272+ tmp_team = (void * )tmp_list -> team ;
5273+ tmp_comm = (MPI_Comm * )tmp_team ;
5274+
5275+ while (tmp_used )
5276+ {
5277+ if (tmp_used -> team_list_elem == tmp_list )
5278+ break ;
5279+ tmp_used = tmp_used -> prev ;
5280+ }
5281+
5282+ if (tmp_used == NULL )
5283+ caf_runtime_error ("SYNC TEAM called on team different from current or ancestor or descendant" );
5284+
5285+ MPI_Barrier (* tmp_comm );
5286+
5287+ }
You can’t perform that action at this time.
0 commit comments