Introduction to Programming with MPI ------------------------------------ Practical Exercise 13 (Attributes and I/O) ------------------------------------------ For general instructions, see the introduction to the collective practicals. It is virtually impossible to test this example, as it is an attempt to defend yourself against user-hostile systems, and so really needs running on a wide range of such things. Question 1 ---------- 1.1 Write a new MPI program, with a collective procedure 'ioprocess' that takes a communicator as an argument and returns the lowest rank in that communicator which can do normal I/O and MPI_UNDEFINED if there is any error or there is no such process. Display the result from each process. The best programming style would be to handle errors properly, except to bypass implementation deficiencies in MPI_Comm_get_attr, of course. The specimen answers ex_09.1.c, ex_09.1.cpp and ex_09.1.f90 do this. NOTE: unfortunately, the MPI used for this course is buggy, so this code will always say there is no such process. That turns its testing from virtually impossible to completely impossible!