







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture is related to Message Passing Interface Library concepts. its helpful for Parallel Computing students. It was delivered by Dr. Hanif Durad at Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS). It includes: Parallel, MPI, Programs, Sequential, Unix, Scalability, Performance, Common, File, Visualization
Typology: Slides
1 / 13
This page cannot be seen from the preview
Don't miss anything!








Dr. Hanif Durad
IntroMPI.ppt
Dr. Hanif Durad
mpi-io_2.ppt
if (myrank != 0)
MPI_Send(buf, BUFSIZE, MPI_INT, 0, 99, MPI_COMM_WORLD);
else {
myfile = fopen("testfile1", "w");fwrite(buf, sizeof(int), BUFSIZE, myfile);for (i=1; i<numprocs; i++) {
MPI_Recv(buf, BUFSIZE, MPI_INT, i, 99, MPI_COMM_WORLD,
&status);
fwrite(buf, sizeof(int), BUFSIZE, myfile);
} fclose(myfile);
} MPI_Finalize();return 0;
}
Dr. Hanif Durad
io0.c
parallel machine may support I/O from only one process (e.g.,no common file system)
Some I/O libraries (e.g. HDF-4, NetCDF) not parallel
resulting single file is handy for
ftp
mv
big blocks improve performance
short distance from original, serial code
lack of parallelism limits scalability, performance (singlenode bottleneck)
Dr. Hanif Durad
P(n-1)
Dr. Hanif Durad
Dr. Hanif Durad
Dr. Hanif Durad
P(n-1)
Each process needs to read a chunk of data from a common file
Dr. Hanif Durad
comm_old
existing communicator
ndims
number of dimensions
periods
logical array indicating whether a dimension is cyclic (If TRUE, cyclic boundary conditions)
reorder
logical (If FALSE, rank preserved)
(If TRUE, possible rank reordering)
comm_cart
new cartesian communicator