Project assignment, all info in the pdf file.
 (here is the code to generate the initial state)
New version, Feb 21st!

Just one modification: for the sake of scientific fidelity, the position needs to be computed before the velocity, the formulas were correct, but one bullet had this the other way around. All results published before are still the same (ie, this change does not have an impact up to 3 decimal positions), but the detailed info text file has been updated.

You may assume that:

  • you may modify init_particles for MPI so that each process just keeps the particles assigned to it; keep in mind that we'll be running very large simulations (> 10M particles, > 1M cells)
  • to reduce stress on the RNL's cluster, we'll only be evaluating your MPI project with up to 32 parallel tasks, either 32 processes or 8 processes each with 4 threads
  • all MPI instances will have more cells on the side than parallel tasks (ie, ncside > p)
  • if a particle moves outside its current cell, it will always move to an immediatly adjacent cell.
  • the starting world does not have particles within the collision distance (naturally the random generation can produce these situations, but we will not test these cases).
  • in one time step, any chain of 3 particles within collision distance should be counted as a single collision (don't worry about more than 3 particles in collision!).

More detailed instructions for future submissions of the project
In order to clarify and harmonize the structure of the submitted projects (so that the automatic evaluation works), you must follow the these rules:
  • name your zip file g<xx><ver>.zip, where:
    • <xx> is the two-digit number of your group;
    • <ver> is the version you are submitting, one of: serial, omp, mpi;
    • the "<" and ">" are not part of the name;
    • eg, group 3 when submitting the serial version should name the file "g03serial.zip".
  • this zip file should have in the first level a single directory named g<xx>
  • inside this directory you should have the following three subdirectories:
    • serial
    • omp
    • mpi  (this need not be present for the OpenMP submission)
  • inside each of these subdirectories there should be:
    • one Makefile that generates the executable inside its subdirectory
    • all the source files you require to compile your code, organized at your discretion
    • do not share files across subdirectories
    • your report in PDF
Use the naming conventions in the project statement for the main source file and for the executable. The name of the executable should be the same as the main source file without the extension. Also, be careful about the cases of the letters, use the names as indicated.

The command "make" should generate your executable, no flags/parameters should be needed. Also, the makefile should use the gnu compiler with the optimization flag -O2.

Sample Instances
New instances, the first three validate collisions with 3 particles and the other two validate performance of the parallel implementation:$ ./parsim 12672 0.05 3 10 10
0.031 0.012
2
Here are the detailed interns for this example.

$ ./parsim 5893 0.05 3 10 10
0.002 0.035
2
$ ./parsim 8555 0.05 3 10 10
0.016 0.049
1
$ ./parsim 12 100 5 10000 10000
76.732 61.943
2209
$ ./parsim -11 3500 20 500000 10
1984.878 1625.992
35


Some more examples that you can use to validate your program:
$ ./parsim 1 5000 100 1000000 4
3936.506 131.472
4
4s
$ ./parsim 1 5000 100 1000000 100
3899.787 156.291
163
1m30s
$ ./parsim 1 5000 20 1000000 10
3918.912 143.364
19
5m
$ ./parsim 1 1000 3 10000 10000
287.788 261.446
31
8m
$ ./parsim 3 5000 50 1000000 300
3819.032 25.659
469
13m
$ ./parsim 3 5000 50 1000000 500
3738.436 58.743
804
20m
$ ./parsim -1 1000 30 100000 1000
575.878 370.663
1203
3m
The times were obtained in the machines of Lab 1 and are indicative, you can do better but this should be fine.


You can find here detailed info on a very simple example. And here is the same instance with info about all particles (not just 0).