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

Create Team Duplicate options #366

Open
naveen-rn opened this issue Feb 7, 2020 · 2 comments
Open

Create Team Duplicate options #366

naveen-rn opened this issue Feb 7, 2020 · 2 comments
Assignees
Milestone

Comments

@naveen-rn
Copy link
Contributor

Define a semantics for team duplication by inheriting the parent teams resources and just a new handle that can be used for collectives.

@naveen-rn naveen-rn added this to the OpenSHMEM 1.6 milestone Feb 7, 2020
@nspark
Copy link
Contributor

nspark commented Jun 1, 2021

Here's a straightforward adaptation from shmem_team_split_strided that mirrors the proposed wording changes in #461. What do you think?

SHMEM_TEAM_DUP

Create a new OpenSHMEM team with the same set of PEs as an existing team.

SYNOPSIS

C/C++:

int shmem_team_dup(shmem_team_t parent_team, const shmem_team_config_t *config,
                   long config_mask, shmem_team_t *new_team);

DESCRIPTION

Arguments

  • IN parent_team An OpenSHMEM team
  • IN config A pointer to the configuration parameters for the new team
  • IN config_mask The bitwise mask representing the set of configuration parameters to use from config.
  • OUT new_team An OpenSHMEM team handle. Upon successful creation, it references an OpenSHMEM team that contains the same set of PEs as in the parent team.

API Description

The shmem_team_dup routine is a collective routine. It creates a new OpenSHMEM team from an existing parent team using the same PE subset as the parent team.

This routine must be called by all PEs in the parent team. On successful creation of the new team:

  • The new_team handle will reference a valid team for the subset of PEs in the parent team.
  • shmem_team_dup will return zero to all PEs in the parent team.

If the new team cannot be created, then new_team will be assigned the value SHMEM_TEAM_INVALID and shmem_team_dup will return a nonzero value on all PEs in the parent team.

The config argument specifies team configuration parameters, which are described in Section 9.4.3.

The config_mask argument is a bitwise mask representing the set of configuration parameters to use from config. A config_mask value of 0 indicates that the team should be created with the default values for all configuration parameters. See Section 9.4.3 for field mask names and default configuration parameters.

If parent_team compares equal to SHMEM_TEAM_INVALID, then no new team will be created, new_team will be assigned the value SHMEM_TEAM_INVALID, and shmem_team_dup will return a nonzero value.

Return Values

Zero on successful creation of new_team; otherwise, nonzero.

@jdinan
Copy link
Collaborator

jdinan commented Jul 7, 2021

Do we want to allow config to be inherited by the child team, e.g. if config == NULL? @naveen-rn was this something you had in mind with the initial issue?

@jdinan jdinan modified the milestones: OpenSHMEM 1.6, OpenSHMEM 1.7 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants