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

Team Split Test Bug #972

Closed
jdinan opened this issue Aug 18, 2020 · 3 comments · Fixed by #1029
Closed

Team Split Test Bug #972

jdinan opened this issue Aug 18, 2020 · 3 comments · Fixed by #1029
Assignees
Milestone

Comments

@jdinan
Copy link
Member

jdinan commented Aug 18, 2020

Looks like the compiler is right about this. Should we add error checks or initialize the dims to 1?

../../../test/spec-example/shmem_team_split_2D.c: In function ‘main’:
../../../test/spec-example/shmem_team_split_2D.c:56:3: warning: ‘zdim’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   56 |   for (int zdx = 0; zdx < zdim; zdx++) {
      |   ^~~
../../../test/spec-example/shmem_team_split_2D.c:57:5: warning: ‘ydim’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   57 |     for (int ydx = 0; ydx < ydim; ydx++) {
      |     ^~~
../../../test/spec-example/shmem_team_split_2D.c:58:7: warning: ‘xdim’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   58 |       for (int xdx = 0; xdx < xdim; xdx++) {
      |       ^~~
@davidozog
Copy link
Member

Indeed, I think so. Could it be a spec doc-edit, or should I prepare a reading? You probably recall we're trying to keep these spec-example tests verbatim with what's upstream.

@jdinan
Copy link
Member Author

jdinan commented Aug 18, 2020

Let's post it as a PR against the spec. Do you think it will cause testing failures? If so, I would also apply the same fix here.

@davidozog
Copy link
Member

I think it's unlikely this test will fail because of this (something would have to go awry with shmem_n_pes or cbrt(npes)).

However, it looks like @rdesai16 actually resolved the compiler warning in her v1.5.0rc PR (#955) (I somehow missed it during review). I think it's ok for us to make the change in SOS, and this issue will track the upstream PR as well.

Any concerns with that?

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

Successfully merging a pull request may close this issue.

2 participants