Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

question on parallelization of verticals of the baroclinic vertical loop

Hi all,I am looking to parallelize or improve performance of ocean model by spawning openmp threads for the verticals loop in baroclinic subroutine.It does seem like the loop is parallel along the verticals and I wish to exploit it.But it is hard to figure out weather it is parallel or not.Does anybody know if the verticals in the baroclinic routine is parallel or not? 
 

klindsay

CSEG and Liaisons
Staff member
Aketh,POP generally uses k as the loop index for loops over the vertical dimension. Execpt for a single loop in init_baroclinic, all k loops in baroclinic.F90 are inside a loop over blocks. These block loops are all parallelized with OMP PARALLEL DO directives.I think adding more parallelization to the k loops would be difficult. One issue is that some of the loops have data dependencies from one k value to the next. An example is the variable WTK in baroclinic_driver and tracer_update. WTK's value for one k value depends on its value, and other computations, from previous k values. In order to parallelize these loops, the code would need to be restructured to eliminate these data dependencies. This would take considerable work to track down all dependencies and work around them. Another issue is that some diagnostic and tavg buffers get summed cummulatively over k. The code would need to be restructed to avoid parallel instances of these sums clobbering each other's computations. There might be other issues too. I would only suggest attempting this if you are fairly familiar with how POP works.Keith
 
Top