







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































Chapter 4
Task/Channel Message-passing
Task Process
Explicit channels Message communication
1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Not satisfied
0
ļ® Embarrassingly parallel: No channels between tasks
*int main (int argc, char argv[]) { int i; int id; / Process rank / int p; / Number of processes / void check_circuit (int, int);
ļ® Include argc and argv : they are needed
to initialize MPI
ļ® One copy of every variable for each process
running this program
MPI_Init (&argc, &argv);
MPI_COMM_WORLD
Communicator
0
2 1
3
4
5
Processes
Ranks
Communicator Name
second argument
MPI_Comm_size (MPI_COMM_WORLD, &p);