Skip to content
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

Limits with MPI_Send or MPI_Recv ?? #1669

Closed
astrung opened this issue May 13, 2016 · 7 comments
Closed

Limits with MPI_Send or MPI_Recv ?? #1669

astrung opened this issue May 13, 2016 · 7 comments
Labels

Comments

@astrung
Copy link

astrung commented May 13, 2016

Do we have any limits about message size on MPI_Send or MPI_Recv - or limits by computer ??? When i try to send large data, it can not completed.
This is my code :

All_gather.zip
It stopped when i try to run with a buffer about 80000 bytes(40000 integer)

@jsquyres
Copy link
Member

The attached code does not compile:

$ mpicc All_gather.c
All_gather.c:48:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^

Additionally, it looks like this code is not correct: you are assuming that MPI_Sends can complete before their respective MPI_Recvs have been posted. This is usually referred to as assuming that MPI has implicit buffering. See the MPI-3.1 document, page 43, example 3.9 -- your code seems to be making the same mistake.

@astrung
Copy link
Author

astrung commented May 13, 2016

Should i use MPI_ISend or use MPI_Sendrecv ???

@jsquyres
Copy link
Member

It depends on your application. In the example you sent, probably either would be fine.

@astrung
Copy link
Author

astrung commented May 13, 2016

But for peformance, which method can be the best solution ???( MPI_Send , ISend , Sendrecv )

@jsquyres
Copy link
Member

Keep in mind that you have to get your application correct first, and then worry about optimization.

All the various MPI send / receive mechanisms have various benefits and tradeoffs. And it very much depends on what exactly your real application is doing. Your best bet may well be to try each of the different mechanisms and see which work best for your particular application.

@astrung
Copy link
Author

astrung commented May 14, 2016

@jsquyres Using MPI_Isend after MPI_Irecv immediately, could we lost data by sending before received node is ready ??
My code:
for
MPI_Irecv
MPI_Isend
MPI_Wait_all

@jsquyres
Copy link
Member

No. MPI's communication is defined to be reliable / lossless (even if the receiver isn't ready when the data is sent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants