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

long double datasize issues for shmem_put_global tests #24

Open
naveen-rn opened this issue Mar 14, 2017 · 5 comments
Open

long double datasize issues for shmem_put_global tests #24

naveen-rn opened this issue Mar 14, 2017 · 5 comments

Comments

@naveen-rn
Copy link

naveen-rn commented Mar 14, 2017

@tonycurtis The datasize for long double is assumed as 128b on the feature_tests/C/test_shmem_put_globals.c tests. It seems the long double datasize depends on the compiler precision. It can vary from 64b to 128b. Using long double variables for testing shmem_put128 doesn't seem right.

Let me know what you think.

@tonycurtis
Copy link
Contributor

tonycurtis commented Mar 15, 2017 via email

@jdinan
Copy link

jdinan commented Mar 16, 2017

One fix would be to adjust the array length:

long double src4[N*128/sizeof(long double)];

But this messes up indexing elsewhere and is fragile if long double is ever larger than 128B..

My preference would be to use the sized integers when testing any of the SHMEM routines that contain a number of bytes/bits in the function name. Or, for a more minimal change, to add an error check that the size of the type meets the requirements of the unit test.

@naveen-rn
Copy link
Author

int16_t foo[8][N]; shmem_put128(foo, foo, N, 1);

Can we do something similar to the above example. It looks like a possible usage for shmem_put128 in a global variable on real applications.

@naveen-rn
Copy link
Author

@tonycurtis Shall i create a PR for this change?

@tonycurtis
Copy link
Contributor

tonycurtis commented Mar 20, 2017 via email

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