Skip to content

Conversation

@xinzhao3
Copy link
Contributor

@xinzhao3 xinzhao3 commented Mar 28, 2018

Originally there is a "oshmem_shmem_globalexit_status" variable to track if current shmem_finalize is the implicit one at end of main, and shmem_finalize does real work when it is, otherwise it does nothing.
This is not correct, if shmem_finalize is the explicit one in the program, it should still guarantee the completion of pending communications, according to specification 1.3 page 10.
This PR modified use of "oshmem_shmem_globalexit_status" variable so that if shmem_finalize is not the one at end of main, it still waits for all oshmem communications and release oshmem resources.

Signed-off-by: Xin Zhao xinz@mellanox.com

@xinzhao3
Copy link
Contributor Author

@jladd-mlnx @bureddy

@rhc54
Copy link
Contributor

rhc54 commented Mar 28, 2018

Excuse me - you don't have to open a new PR every time you want to make a change to it. You can simply push your change to the existing PR. This will save on the repeated emails being generated. If you don't want the multiple commits to show, then just:

$ git rebase -i master
...squash all commits to one...
$ git push -f

Thanks

@xinzhao3
Copy link
Contributor Author

@rhc54 sorry about that. there was an error on author name/email and I cannot fix it by force pushing. Will force push next time.

@rhc54
Copy link
Contributor

rhc54 commented Mar 28, 2018

Actually - you can do that too! Just amend your commit message (with git commit --amend) and re-push it.

@xinzhao3 xinzhao3 force-pushed the topic/shmem-final branch from 61834b8 to f1ef514 Compare March 28, 2018 01:56
@xinzhao3
Copy link
Contributor Author

@rhc54 yeah, you are right. I do not need rebase. Thanks!

@xinzhao3 xinzhao3 force-pushed the topic/shmem-final branch 2 times, most recently from 5ea692a to ce7fbc4 Compare March 28, 2018 02:31
@jladd-mlnx
Copy link
Member

@alex-mikheev Alex can you please have a look.

@xinzhao3
Copy link
Contributor Author

bot:retest

@alex-mikheev
Copy link
Contributor

it looks ok. Is there a test in verifier for the explicit calling of shmem_finalize() ?

@jsquyres
Copy link
Member

bot:ompi:retest

@xinzhao3
Copy link
Contributor Author

@alex-mikheev there is a test in ompi-tests/test-uh, path is ompi-tests/test-uh/feature_tests/C/test_shmem_finalize.c

@jladd-mlnx
Copy link
Member

@gpaulsen FYI.

@jsquyres
Copy link
Member

@sam6258
Copy link
Contributor

sam6258 commented Mar 28, 2018

@xinzhao3 The test is now passing for me. Verified failure before the fix was applied as well.

@xinzhao3
Copy link
Contributor Author

@sam6258 that's great! Thanks for verifying it.

@alex-mikheev
Copy link
Contributor

@xinzhao3 can you add a test to the https://github.com/openshmem-org/tests-mellanox

@xinzhao3
Copy link
Contributor Author

@alex-mikheev I will add the test.

{
int ret = OSHMEM_SUCCESS;
static int32_t finalize_has_already_started = 0;
int32_t _tmp = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is no longer used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will re-push soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sam6258 I think I already deleted it in this commit, it is a '-' at beginning :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xinzhao3 I was referring to _tmp

@jsquyres
Copy link
Member

bot:ompi:retest

Signed-off-by: Xin Zhao <xinz@mellanox.com>
@xinzhao3 xinzhao3 force-pushed the topic/shmem-final branch from ce7fbc4 to 4aad386 Compare April 2, 2018 14:08
@xinzhao3
Copy link
Contributor Author

xinzhao3 commented Apr 2, 2018

@sam6258 Thanks, I just delete _tmp and re-pushed.

@bwbarrett
Copy link
Member

bot:ompi:retest

Brian broke the 32bit builds...

@hppritcha
Copy link
Member

ubuntu unhappy here too.
bot:ompi:retest

@jladd-mlnx jladd-mlnx merged commit e87cb25 into open-mpi:master Apr 4, 2018
@jladd-mlnx
Copy link
Member

@xinzhao3 please open PRs against 3.0.x and 3.1.x branches.

@xinzhao3 xinzhao3 deleted the topic/shmem-final branch April 23, 2018 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants