/mpi-codes

High Performance Computing using MPI Workshop (IIT Kanpur, 2013) Codes

Primary LanguageC

mpi-codes

High Performance Computing using MPI Workshop Slides - Link

Compile code using:

mpicc filename.c

Execute it using:

mpirun -np NUM_OF_PROCS ./a.out
Code Description
helloworld The most basic program which prints "Hello world" from all the processes
hello_send_recv Illustrates the use of MPI_Send and MPI_Recv functions. The main process sends a message, “Hello, world”, to the process whose rank is 1, and after receiving the message, the process prints the message along with its rank
vector_addition and vector_add Break two vectors in NPROC parts, add the elements in parallel, then rejoin
pi Pi calculation
mpi_prime To check for the occurance of Prime number