联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2020-02-14 08:59

MPI Programming Assignment– The Game of Life

The aim of this assignment is to write a parallel version of Conway’s Game of Life (details are in the lecture notes associated with this assignment and can also be found online).

You must use domain decomposition in which each processor only allocates enough memory to store its portion of the domain (together with any padding required to receive the data from neighbouring processes). The easiest way to divide the domain is into vertical or horizontal strips, but this can become inefficient quite rapidly as the number of processors grows as it will result in very long thin domains with a large number of boundary elements relative to their area. Far more efficient is to divide the simulation into rectangular domains that are as close to square as possible. The communication pattern involved is virtually identical to that implemented in Exercise 3 of worksheet 2 and will involve transferring a layer of grid cells just inside the edge of the domain from the neighbouring processors and receiving a layer of grid cells situated just outside the domain back from the neighbours. This will take the form of peer-to-peer communications with no master process.

I want you to be able to run the simulation with either fixed or periodic boundaries (have a constant which decides what type of boundary is to be used). With periodic boundaries you need to maintain communications across the periodic boundary. Watch out for the situation where the matching periodic boundary is on the same processes (this can easily occur when using only a few processes).

The code must be able to use an overall domain of arbitrary size so that you can test your simulator’s efficiency as the domain size is changed. You should also be able to change the height and width of the domain independently of one another (how might this impact the best decomposition?),  

You can decide on the initial configuration of the cells, which can be random if you wish (how is the pattern evolution influenced by the proportion of live cells?). You can generate these initial distributions on the various processes rather than having them be generated on a single process and then transferred.

You should carry out the simulation for a specified number of steps. At each step each process should generate their own output file. You should therefore write a separate program or script which collates these files. This can be done in Python in order to be able to easily generate graphical outputs.

In addition to documented source code you should also hand in a short report which includes an analysis of the performance of the code. I wish to see how the Efficiency/Speedup changes with the size of the problem and the number of cores used. You will need to use the hpc system if you are to test this on a suitable number of cores to see good trends.

Note that this is an individual coursework and you MUST NOT copy code from anyone else.

The due date for the assignment is midnight on Sunday 23 February.

Mark Scheme

Code documentation including commenting -20%

Code implementation, structure and efficiency -40%

Postprocessing and results -10%

Analysis and discussion of the program’s performance -30%


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp