Exercise E11:
- Implement the explicit solver for the heat equation on the unit square
as a sequential program (or download it) with
- initial value: u0(x,y)=-50((x-0.5)2+(y-0.5)2)
- boundary value: g(x,y)=(xy+y2)/50
- and source: f(x,y)=5 exp(-50 ((x-0.1)2+(y-0.25)2))
Comparisons should be done at t=1.
- Write a parallel program with data distribution "pipeline" using blocking
pipeline communication. Compare performance with blocking odd-even communication.
- Switch from blocking to non-blocking communication (latency hiding)
and document the performance gain.
- Write a parallel program with data distribution "mesh" and non-blocking
mesh communication using MPI Cartesian Topology. Compare performance with
the best pipeline implementation.
Remark: Write the parallel code in such a way that each node stores its final
result in a separate file. For example, if p is the rank of the processor,
the filename fname of the result can be generated with
sprintf(fname, "result%02d", p);
In the mesh case with processor coordinates coords, use
sprintf(fname, "result%02d%02d", coords[0], coords[1]);
The different result files can easily be combined and visualized with matlab.
Back