Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: optimize FORM TEAM by removing extra barrier #630

Closed
nathanweeks opened this issue Jan 18, 2019 · 3 comments
Closed

RFE: optimize FORM TEAM by removing extra barrier #630

nathanweeks opened this issue Jan 18, 2019 · 3 comments

Comments

@nathanweeks
Copy link
Contributor

nathanweeks commented Jan 18, 2019

Execution of a FORM TEAM statement results in the following calls to MPI routines in mpi_caf.c:

void PREFIX(form_team) (...)
{
...
  MPI_Comm *current_comm = &CAF_COMM_WORLD;
...
  ierr = MPI_Barrier(CAF_COMM_WORLD); chk_err(ierr);
...
  ierr = MPI_Comm_split(*current_comm, team_id, caf_this_image, newcomm);
...
}

MPI_Comm_split() is effectively a barrier: no MPI processes in CAF_COMM_WORLD can return from MPI_Comm_split() until all MPI processes in CAF_COMM_WORLD have called it. It seems that the aforementioned MPI_Barrier could be removed while still maintaining the FORM TEAM synchronization semantics as specified in the Fortran 2018 (N2146 draft):

11.6.9 FORM TEAM statement
...
5 ...When a FORM TEAM statement is executed, there is an implicit synchronization of all active images in the current team. On those images, execution of the segment following the statement is delayed until all other active images in the current team have executed the same statement the same number of times in this team. The segments that executed before the FORM TEAM statement on an active image of this team precede the segments that execute after the FORM TEAM statement on another active image of this team...

@stale
Copy link

stale bot commented Mar 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Mar 29, 2019
@stale stale bot removed the stale label Mar 29, 2019
@stale
Copy link

stale bot commented Apr 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Apr 26, 2019
@stale stale bot removed the stale label Apr 26, 2019
nathanweeks added a commit to nathanweeks/OpenCoarrays that referenced this issue Apr 28, 2019
MPI_Comm_split alone is sufficient to provide the
image-control-statement image ordering semantics required by FORM TEAM.

Implements RFE in issue sourceryinstitute#630.
@nathanweeks nathanweeks mentioned this issue Apr 28, 2019
4 tasks
@zbeekman
Copy link
Collaborator

resolved in PR #660. Thanks so much @nathanweeks!!! You rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants