Strumenti Utente

Strumenti Sito


roberto.alfieri:user:reti:life

Sistemi dinamici discreti su griglia con comunicazioni a primi vicini

Caratteristiche:

  • Evoluzione guidata da una funzione di Update eseguita in modo sincrono su tutti gli elementi del sistema discreto
  • Condizioni al contorno periodiche
  • Elevato grado di parallelismo, particolarmente adatto per le moderne architetture di calcolo

Sistemi dinamici discreti

Sistemi dinamici nel continuo

Game of life

Come semplice esempio che implementa questo algoritmo utilizziamo the game of life.

In a bidimensional grid the cells are either "alive" or "dead" and their state is updated in synchrony; the new state is determined by the following rules:

  • If a cell is empty ("dead") and has exactly 3 neighbors, it has enough resources to be born without being overcrowded, and the next turn will be "alive"
  • If a cell is alive and has 3 or 4 neighbors, it has resources without being overcrowded and will stay "alive".
  • If a cell has less than 2 neighbors, it cannot get enough resources to survive and the next turn will be "dead".
  • If a cell has more than 4 neighbors, it will be overcrowded and the next turn will be dead.

Serial implementation

Single processor: Borders are exchanged via memory transfers

life.c life_common.h

life.bash

openMP implementation

Example: a Whole Node 4 cores

  • 1D domain decomposition
  • Rows and columns are exchanged via memory transfers by a single thread

life_omp.c

life_common.h

life.bash

life_scale.bash

 sh life_scale.bash 2> /dev/null 1> result.dat

Full program

roberto.alfieri/user/reti/life.txt · Ultima modifica: 17/12/2012 17:33 da roberto.alfieri