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

SHMEM_HEAP_TYPE constant is undefined, which causes compile error. Ch… #17

Merged
merged 3 commits into from
Aug 28, 2017

Conversation

ireed
Copy link
Contributor

@ireed ireed commented Aug 21, 2017

…anged to read it as a system env var.

ireed added 2 commits August 20, 2017 18:28
…mem_broadcast() to shmem_broadcast64(). Note that shmem_broadcast64 tests already exist; this has been reported as an issue
@ireed
Copy link
Contributor Author

ireed commented Aug 21, 2017

The 2nd commit (db19e9e) is related to - and temporarily resolves - shmem_broadcast issue: #16

… calls. Also changed undefinded _SHMEM_ALLTOALL_SYNC_SIZE constant to SHMEM_ALLTOALL_SYNC_SIZE.
@@ -49,7 +49,7 @@ static int memheap_type(void)
if (memheap_type != MEMHEAP_ALLOC_UNKNOWN)
return memheap_type;

p = getenv(SHMEM_HEAP_TYPE);
p = getenv("SHMEM_HEAP_TYPE");
Copy link
Contributor

Choose a reason for hiding this comment

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

SHMEM_HEAP_TYPE constant is part of spec, cannot be just string
see here:
https://github.com/open-mpi/ompi/blob/master/oshmem/include/shmem.h.in#L76

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see it in the implementation (code), but i dont see it defined (in the specs): https://github.com/openshmem-org/specification,
OpenSHMEM-1.3.pdf

Is this constant unique to that flavor of openShmem?

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a specification compliance bug in the OSHMEM implementation. The SHMEM_HEAP_TYPE constant is not part of OpenSHMEM. Added this to the open ticket filed with OMPI (open-mpi/ompi#4098).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this change is incorrect, although benign. SHMEM_HEAP_TYPE is a string constant in the OMPI header file. I think the right fix is to replace this with SHMEM_SYMMETRIC_HEAP_ALLOCATOR, which is the value of the SHMEM_HEAP_TYPE constant.

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, seems you are right

in ompi shmem.h it is defined as #define SHMEM_HEAP_TYPE "SHMEM_SYMMETRIC_HEAP_ALLOCATOR"

@ireed - can you please submit PR and use SPEC constant directly, thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Done -- #18.

@jdinan
Copy link
Contributor

jdinan commented Aug 28, 2017

@miked-mellanox Anything we can do to help with this PR? Thanks!

@mike-dubman mike-dubman merged commit 8be85e9 into openshmem-org:master Aug 28, 2017
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 this pull request may close these issues.

4 participants