GeoscienceAustralia / anuga_core

AnuGA for the simulation of the shallow water equation
https://anuga.anu.edu.au
Other
189 stars 93 forks source link

The case for cpu parallel computing #279

Open dili5 opened 1 week ago

dili5 commented 1 week ago

Hello, Professor:

 Any case study on cpu parallel computing please? Or how it is used.
stoiver commented 1 week ago

@dili5 We have examples of parallel code in the anuga_core/examples/parallel directory.

For instance to run on 3 cores use:

mpiexec -np 3 python -u  run_parallel_tsunami.py

The -u helps to flush the print buffers and so makes for cleaner output during the simulation.

Note that in a parallel script, you first create your standard domain on process 0, and then distribute that sequential domain to a parallel domain which has instances on all the processes.