Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103019547
iping.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 13:27
Size
437 B
Mime Type
text/x-c
Expires
Fri, Feb 28, 13:27 (2 d)
Engine
blob
Format
Raw Data
Handle
24482674
Attached To
R11821 phys-743-lecture
iping.c
View Options
#include <mpi.h>
#include <stdio.h>
int
main
(
int
argc
,
char
*
argv
[])
{
int
rank
;
int
buf
[
100
];
MPI_Request
request
;
MPI_Status
status
;
MPI_Init
(
&
argc
,
&
argv
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
MPI_Isend
(
buf
,
100
,
MPI_INT
,
1
,
0
,
MPI_COMM_WORLD
,
&
request
);
else
if
(
rank
==
1
)
MPI_Irecv
(
buf
,
100
,
MPI_INT
,
0
,
0
,
MPI_COMM_WORLD
,
&
request
);
MPI_Wait
(
&
request
,
&
status
);
MPI_Finalize
();
}
Event Timeline
Log In to Comment