-
Notifications
You must be signed in to change notification settings - Fork 293
Querying for supported/unsupported datatypes #7341
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
Comments
Type_size is supposed to return UNDEFINED if the type is missing. |
MPI 5.0 RC, Section 20.4 (document page 850):
|
Yes, I forgot about it. MPICH is currently not following these rules. |
@jeffhammond This was something we added recently, right? In retrospect, I'm wondering if such behavior (i.e returning undefined) is too error prone. Perhaps a better, alternative check would have been about |
It was added in September when I had to split out all of the Fortran stuff from the ABI. I see no difference between the user needing to check for Today, if There are many ways for users to handle this. I'm not sure what your usage is, but since you know that |
It looks like Hui did a massive refactoring and this feature got lost. I'm sure it's a simple fix and will be available soon enough. We have until June to get everything sorted out 😄 |
If we had an alternative mechanism, rather than returning a negative value, the call could just error. That's much more visible, at least with the default error handler (except for IO). Anyway, my |
Actually, I think the feature was no implemented as the standard says. Rather, |
I can fix Returning From a user (who are too lazy to peruse manual), use |
We may not need a new one, but just PS: IMHO, the only API difference between the standard ABI and the MPICH ABI should be the presence of the |
If you use ISO_C_BINDING, also use C mpi types. You have to use c types with ISO_C_BINDING anyway |
I deleted my comments, there is absolutely no point in continuing discussions about this topic. FWIW, MPICH is currently not following the standard regarding |
The fact is, because my proposal to fix a MPI Fortran ABI was rejected by the Forum, we have a difficult situation any time an MPI implementation is built without Fortran support. However, it's not really more difficult than before. The failures just wait until runtime to appear. Today, when a user tries to use MPICH without Fortran support, I think we are overestimating the impact of no-Fortran MPI builds. The only way these exist is when people like us compile them from source. All of the MPI products and all of the package managers are shipping Fortran support in their MPI libraries. The only potential issue I see is that users might need to link
If a type is not defined, then the logical result of a query of its size is
If we decide to add |
PR #7319 broke mpi4py tests, not because of a bug, but a small change of behavior regarding unsupported datatypes.
https://github.com/mpi4py/mpi4py-testing/actions/runs/13867883975/job/38810396859
For example, if MPICH was built without Fortran, calling
MPI_Type_size
on let sayMPI_REAL
would not fail but return size=0. After that PR, now the MPI_Type_size call fails. How would a user check for the availability of a datatype without having to mess with setting/restoring the ERRORS_RETURN error handler in COMM_WORLD?Is this something that should be addressed in the MPI Forum, or is there is a quick compromise that could be taken here like the size=0 hack I was abusing before? Maybe for the specific case of Fortran I can use the new
MPI_Abi_get_fortran_info
, but I'm wondering if the problem of querying datatype availability is of more broad scope than just Fortran.cc @jeffhammond
PS: @hzhou Off-topic, have you opened a PR for the new
MPI_LOGICAL<N>
datatypes?The text was updated successfully, but these errors were encountered: