Research Article
Analysis of a New MPI Process Distribution for the Weather Research and Forecasting (WRF) Model
Algorithm 1
Integration step (solve_em) pseudocode obtained from WRF Fortran code.
(1) | function COMPUTE_SOMETHING(tile) | (2) | for to do Iterate the tile | (3) | for to do The iteration order is OK | (4) | for to do | (5) | tile[i][k][j] = … Do something on the grid | (6) | end for | (7) | end for | (8) | end for | (9) | end function | (10) | procedure SOLVE_EM(subdomain) | (11) | … Initialization | (12) | !$OMP PARALLEL DO One thread per tile | (13) | for to numtiles do Iterate tiles | (14) | compute_something(subdomain[t]) Pass the tile to the function to compute something | (15) | end for | (16) | !$OMP END PARALLEL DO End of parallel region | (17) | if DM_PARALLEL then If MPI is being used | (18) | HALO_EM∗∗∗.inc Send halos to other adjacent processes depending on the stencil | (19) | end if | (20) | … Replicate the same loop structure tens of times for the different variables to compute on the subdomain | (21) | end procedure |
|