Have fun with MPI in C
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Introduction Questions
Distributed-Memory Programming is
?What is Symmetric multiprocessing? -[x] involves a multiprocessor computer hardware and software architecture where two or more identical processors are connected to a single, shared main memory. -[x] involves a multiprocessor computer hardware and software architecture where two or more identical processors are connected to a multiple, shared main memory.
MPI is
OpenMPI is
The OpenMPI Open, Portable Access Layer is responsible for
What is an MPI binding?
The OpenMPI Open MPI Run-Time Environment (ORTE) is responsible for
The MPI_Init function tells the MPI system to
The MPI_Finalize function tells the MPI system
The rank of an MPI process in the MPI_COMM_WORLD communicator is a
Provide the C code using OpenMPI that write on the STDOUT the number of the processors involved in the computation.
1
2
3
4
5
6
7
#include <mpi.h>
#include <stdio.h>
int main(int argc, char** argv) {
//YOUR CODE HERE
}
Enter to Rename, Shift+Enter to Preview
Provide the C code using OpenMPI that write on the STDOUT the rank of the process. Consider that the execution on the mpi process use the flag -np=1. The output of your program must be in the form: Hello world from processor 4ec330b6dbf8, rank 0 out of 1 processors.
1
2
3
4
5
6
7
#include <mpi.h>
#include <stdio.h>
int main(int argc, char** argv) {
//YOUR CODE HERE
}
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content