-
Notifications
You must be signed in to change notification settings - Fork 44
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
dash::Matrix doesn't accept struct as template datatype #241
Comments
My guess would be that |
Matrix accepts structs, but all members have to be trivially-copyable. How is MTRX_TYPE defined? |
Interestingly we enforce is_trivial for Matrix but not for Array, which has the following comment in it:
For details on the two: http://stackoverflow.com/questions/4178175/what-are-aggregates-and-pods-and-how-why-are-they-special/7189821#7189821
In any case, the behavior should be consistent. |
Here is an old "design document" on this issue. |
@dhinf MTRX_TYPE is defined: using MTRX_TYPE = uchar; |
How is uchar defined? I tried a struct with unsigned char and it worked. |
@fuerlinger The only exception is the Cray compiler: it uses the g++ header files of version 4.8.2 (!), even in the latest CCE 8.5.6. Loading a different GNU version does not change this situation. The Cray compiler claims to support C++11, so this is clearly a missing feature. Will file a bug report :) |
@dhinf Yes uchar is just a unsigned char. remark: the code is a construction site and incomplete, but runs so far... |
@devreal Yeah, Cray, much like OpenMPI, are speshul and spoil the fun for everyone. Please don't invest your time in fixing their issues. As far as I'm concerned, I'm fine with something like |
The Cray on-site support escalated this issue to the compiler group so it might get fixed at some point. In the mean-time, we will guard the check through the I adapted the containers in branch |
Some more observations:
|
Thanks for escalating the issue with Cray! On having a And that of course ties in with #221 : I think we should really allow to copy global pointers between units, again if we don't allow that then the value of a global pointer is greatly diminished and it will make many things more complex and costly down the road. And I think we can make it happen with not too much effort. The issue is that segment IDs are not consistent across units, correct? I think we can find a way to fix that. |
I fully agree that a GlobPtr (and the underlying Regarding |
Why does
dash::Matrix
and thusdash::NArray
not accept struct as template datatype whiledash::Array
does?For example:
The text was updated successfully, but these errors were encountered: