-
Notifications
You must be signed in to change notification settings - Fork 908
opal/datatype: do not compute ptypes for OPAL predefined datatypes #3526
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
opal/datatype: do not compute ptypes for OPAL predefined datatypes #3526
Conversation
Fixes open-mpi#3522 Signed-off-by: Gilles Gouaillardet <[email protected]>
@bosilca can you please review and merge if ok ? OPAL predefined datatypes are declared as @jsquyres FYI |
@ggouaillardet Ah, now I understand your earlier comments on #3522 better. Thanks. |
@jsquyres next time i will try to use more words ... |
This is strange. We alter the content of the OPAL predefined datatypes in opal_datatype_init (via the opal_datatype_basicDatatypes array), and that part of the code didn't trigger any segfault. |
@bosilca this is ok for me for( i = OPAL_DATATYPE_FIRST_TYPE; i < OPAL_DATATYPE_MAX_PREDEFINED; i++ ) {
datatype = opal_datatype_basicDatatypes[i];
/* All of the predefined OPAL types don't have any GAPS! */
datatype->desc.desc[0].elem.common.flags = OPAL_DATATYPE_FLAG_PREDEFINED |
OPAL_DATATYPE_FLAG_DATA |
OPAL_DATATYPE_FLAG_CONTIGUOUS |
OPAL_DATATYPE_FLAG_NO_GAPS;
...
OPAL_DECLSPEC extern union dt_elem_desc opal_datatype_predefined_elem_desc[2 * OPAL_DATATYPE_MAX_PREDEFINED]; since we do not modify the pointer (read only) but the pointed object (read/write), this is ok. makes sense ? |
thanks @ggouaillardet for pointing this out. Indeed most of the datatype is const with the exception of the I also found an issue in my code in the OPAL_DATATYPE_INIT_PTYPES_ARRAY_UNAVAILABLE macro. It should be
Looking at this I wonder if we don't have a bug in opal_datatype_compute_ptypes for predefined composed datatype. |
@bosilca what do you mean by "predefined composed datatypes" ?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch fixes all known pb. 👍
Fixes #3522
Signed-off-by: Gilles Gouaillardet [email protected]