MOVING PARTICLES IN A 2x2 GRID

In this exercise we will simulate a set of particles moving randomly in a 2-dimensional space within a bounding box. The coordinates of the overall simulation box are between 0.0 and 1.0 along each dimension. The particles are divided among chares based on their coordinates. The chares are organized in a 2-dimensional array of chares (using a chare array) of size k x k. So, each chare owns a bounding box of its own with size 1/k x 1/k. This exercise will include

The relevant code for this exercise can be downloaded here. There are three folders consisting of the base code and the solution for that exercise. Modify the Makefile to point to your compiled charm and run make test to run the test.

Exercise 1: Reductions

You can refer to the reductions section in the charm manual.

Exercise 2: Load Balancing

You can refer to the load balancing section in the charm manual. You can also look at various examples located in charm/examples/charm++/load_balancing/.

Exercise 3: Projections for performance evaluation

You can refer to the projections section in the charm manual.

Exercise 4: Using liveViz for live visualization

(NOTE: Do this part on a local machine, LiveViz may not work on some remote clusters because of the secured ssh connections.)

In this part you will visualize the 2-D grid with moving particles with LiveViz. Each particle has a variable called color. In the beginning Green particles will be distributed on the left half of the array, blue particles will be on the right half of the array and red at the 4 quarter corners. This part of the code is given. You can refer to the liveViz section in the manual. You can also look at wave2d application located in charm/examples/charm++/wave2d.