-
Notifications
You must be signed in to change notification settings - Fork 861
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
small array of derived data type(in Fortran) can be sent by MPI_Isend and MPI_Irecv but it ran into errors when I augment the array #12595
Comments
There are some major issues with this code, let me highlight two:
Additional suggestions for improving this code:
|
@bosilca Thank you very much for your kind and helpful reply. The original code works well after adding the |
Even if the issues reported by @bosilca are addressed, I do not think this can work: Bottom line, subarrays should not be used with non blocking communications for now. Note the MPI standard defines the |
@ggouaillardet Thank you for your suggestion. It really helped me understand the issue better. |
Please submit all the information below so that we can understand the working environment that is the context for your question.
Background information
I want to exchange some data of derived data types between several ranks. When the sent data is a small array, the data can be sent and received successfully. But if I changed the array from e(2:2) to e(200:200) and sent 2(100,1:100), it showed errors. I didn't revise any other part but just the dimension of the array. It is so strange. I also tested if this problem occurs when the data type is double precision and found that it didn't.
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
v4.0.3
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
source
If you are building/installing from a git clone, please copy-n-paste the output from
git submodule status
.Please describe the system on which you are running
Details of the problem
The derived data type is
efield
andMPI_EFIELD
is the corresponding MPI_datatype. I use theMPI_Isend
andMPI_Irecv
to exchange the derived datae
between rank 0 and rank 1. It works well when I send a small array, like, e(2,2). However , when I handled a larger array, e(200:200), and sent e(1,1:100), it ran into errors and it seemed that the data were not exchanged.The first is the example code of a small array, i.e., e(2,2), and it was followed by the output:
output:
This is the second code, where I only changed the dimensions of e and the count of sent data, and it is followed by the output,
output:
I also tested other cases when the data type is
double precision
, but it worked well. So I wondered what's the reason for this and how could I solve this problem.The text was updated successfully, but these errors were encountered: