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 @@ -295,6 +295,7 @@ void PREFIX (fail_image) (void) __attribute__ ((noreturn));
295295void PREFIX (form_team ) (int , caf_team_t * , int );
296296void PREFIX (change_team ) (caf_team_t * , int );
297297void PREFIX (end_team ) (caf_team_t * );
298+ void PREFIX (sync_team ) (caf_team_t * , int );
298299
299300int PREFIX (image_status ) (int );
300301void PREFIX (failed_images ) (gfc_descriptor_t * , int , int * );
Original file line number Diff line number Diff line change @@ -4899,3 +4899,31 @@ void PREFIX (end_team) (caf_team_t *team __attribute__ ((unused)))
48994899 caf_this_image ++ ;
49004900 MPI_Comm_size (CAF_COMM_WORLD ,& caf_num_images );
49014901}
4902+
4903+ void PREFIX (sync_team ) (caf_team_t * team , int unused __attribute__ ((unused )))
4904+ {
4905+ caf_teams_list * tmp_list = NULL ;
4906+ caf_used_teams_list * tmp_used = NULL ;
4907+ void * tmp_team ;
4908+ MPI_Comm * tmp_comm ;
4909+
4910+ /* Check if the team is the current, and ancestor or a descendant. To be implemented. */
4911+
4912+ tmp_used = used_teams ;
4913+ tmp_list = (struct caf_teams_list * )* team ;
4914+ tmp_team = (void * )tmp_list -> team ;
4915+ tmp_comm = (MPI_Comm * )tmp_team ;
4916+
4917+ while (tmp_used )
4918+ {
4919+ if (tmp_used -> team_list_elem == tmp_list )
4920+ break ;
4921+ tmp_used = tmp_used -> prev ;
4922+ }
4923+
4924+ if (tmp_used == NULL )
4925+ caf_runtime_error ("SYNC TEAM called on team different from current or ancestor or descendant" );
4926+
4927+ MPI_Barrier (* tmp_comm );
4928+
4929+ }
You can’t perform that action at this time.
0 commit comments