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

Should team strides be positive? #491

Closed
nspark opened this issue Mar 25, 2022 · 1 comment
Closed

Should team strides be positive? #491

nspark opened this issue Mar 25, 2022 · 1 comment

Comments

@nspark
Copy link
Contributor

nspark commented Mar 25, 2022

The current (1.5) definition of shmem_team_split_strided does not constrain the stride argument to be positive. As written, it may be negative or even zero, (potentially) allowing for the creation of the following teams:

shmem_team_t world_reversed;
shmem_team_split_strided(SHMEM_TEAM_WORLD,
                         /* start */ shmem_n_pes() - 1, /* stride */ -1, /* size */ shmem_n_pes(),
                         NULL, 0, &world_reversed);

shmem_team_t zero_stride;
shmem_team_split_strided(SHMEM_TEAM_WORLD,
                         /* start */ shmem_my_pe(), /* stride */ 0, /* size */ 4,
                         NULL, 0, &zero_stride); 

For the former, should a negative-stride team be permissible? This would allow for creating teams with reversed PE indices. (See also #488 (comment).)

For the latter, what does a zero-stride team imply? Per 1.5, it seems that the only PE(s) in the team would be the starting PE, but what value is the size argument here? We can't create a team with, say, four instances of the same PE in it. If stride is zero, does size only serve to distinguish zero vs. nonzero?

@jdinan
Copy link
Collaborator

jdinan commented Nov 7, 2024

Closed by #519

@jdinan jdinan closed this as completed Nov 7, 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

2 participants