-
Notifications
You must be signed in to change notification settings - Fork 286
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
op: replace predefined datatype on input #5776
Conversation
test:mpich/ch3/most |
f3eeddf
to
0b172fa
Compare
test:mpich/ch3/most |
if (dt_ptr && dt_ptr->contents) { | ||
int combiner = dt_ptr->contents->combiner; | ||
if (combiner == MPI_COMBINER_F90_REAL || | ||
combiner == MPI_COMBINER_F90_COMPLEX || combiner == MPI_COMBINER_F90_INTEGER) { | ||
if (MPI_SUCCESS == (*MPIR_OP_HDL_TO_DTYPE_FN(op)) (dt_ptr->basic_type)) { | ||
alt_dt = dt_ptr->basic_type; | ||
} |
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.
Is there any reason not to use MPIR_Datatype_get_basic_type
instead of checking the combiner?
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.
basic_type
will not tell us whether it is one of the predefined F90 types, right?
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.
@raffenet Is this question resolved?
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.
I think so. Wasn't totally aware of these "predefined" types in the standard. Calls into question some of the code that identifies predefined datatypes in MPICH, but that's a separate story.
We are supposed to support operations on some predefined datatype, such as those from MPI_Type_create_f90_xxx. However, those types are in fact derived types wraps around a basic type. Check and replace the input datatype with the basic type if that is the case so the reduction can work. Since the datatype in these case are all input only parameters, there shouldn't be any side effects replacing them.
0b172fa
to
bc7f81a
Compare
Pull Request Description
We are supposed to support operations on some predefined datatype, such
as those from MPI_Type_create_f90_xxx. However, those types are in fact
derived types wraps around a basic type. Check and replace the input
datatype with the basic type if that is the case so the reduction can
work. Since the datatype in these case are all input only parameters,
there shouldn't be any side effects replacing them.
Fixes #1769
[skip warnings]
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short description
Commit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.