xavierdechamps / Shallow_water_FV

Solve the 2D shallow water equations with a finite volume method based on a Q-scheme
10 stars 1 forks source link

Introduce OpenMP parallelism in the code #6

Closed xavierdechamps closed 2 years ago

xavierdechamps commented 2 years ago

The code seems to be well prepared for a openmp parallelism in the subroutine flux.f90 (the loops on the edges are independent). It should accelerate the computations on large problems.

xavierdechamps commented 2 years ago

The code has been parallelized with OpenMP in the subroutine flux.f90 (the two loops on the inner and border edges). The user can (de)activate OpenMP with the parameter Have_OpenMP in the file CMake.config. The number of threads used by OpenMP is set by the environment variable OMP_NUM_THREADS. Changes are effective in commit 414a49052c4f498bb6147cda58b906316c16fc70