Skip to content

Commit

Permalink
Merge branch 'mark-petersen/ocn/remove-redikappadata' into next (PR #…
Browse files Browse the repository at this point in the history
…5575)

Remove ocean unused variable RediKappaData

The variable RediKappaData exists in the Registry file but is not used
in the code. It appears that the gnu compiler removes some underlying
information about the array in optimized mode, and then the MPI
communication hangs when it tries to communicate the size of the array.
When the array is removed the simulation no longer hangs on start-up.

Fixes #5574
[BFB]
  • Loading branch information
jonbob committed Apr 12, 2023
2 parents defb605 + 46b1dec commit fff6482
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3808,10 +3808,6 @@
description="Multiplication factors to smooth ssh at coastlines for SAL caculation"
packages="tidalPotentialForcingPKG"
/>
<var name="RediKappaData" type="real" dimensions="nCells" units="m^2 s^-1"
description="Redi isopycnal mixing Kappa value. This is the data field specified at init."
packages="gm"
/>
</var_struct>
<var_struct name="timeVaryingForcing" time_levs="1">
<var name="windSpeedU" type="real" dimensions="nCells Time" units="m s^-1"
Expand Down
3 changes: 1 addition & 2 deletions components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{
type(mpas_pool_type), pointer :: diagnosticsPool
type(mpas_pool_type), pointer :: forcingPool

real(kind=RKIND), dimension(:), pointer :: RediKappa, RediKappaData
real(kind=RKIND), dimension(:), pointer :: RediKappa
real(kind=RKIND), dimension(:), pointer :: RediHorizontalTaper
real(kind=RKIND), dimension(:), pointer :: dcEdge
real(kind=RKIND) :: coef
Expand All @@ -519,7 +519,6 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{
call mpas_pool_get_dimension(meshPool, 'nEdges', nEdges)
call mpas_pool_get_array(diagnosticsPool, 'RediKappa', RediKappa)
call mpas_pool_get_array(diagnosticsPool, 'RediHorizontalTaper', RediHorizontalTaper)
call mpas_pool_get_array(forcingPool, 'RediKappaData', RediKappaData)
call mpas_pool_get_array(meshPool, 'cellsOnEdge', cellsOnEdge)
call mpas_pool_get_array(meshPool, 'dcEdge', dcEdge)

Expand Down

0 comments on commit fff6482

Please sign in to comment.