Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105217411
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
Sat, Mar 15, 12:58
Size
437 B
Mime Type
text/x-c
Expires
Mon, Mar 17, 12:58 (2 d)
Engine
blob
Format
Raw Data
Handle
24945848
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