Skip to content

Commit f5d7c3b

Browse files
committed
Merge branch 'atmosphere/rho_zz_int_decl' into develop (PR #1330)
This merge fixes an OpenACC "partially present" error for rho_zz_int in the atm_advance_scalars_mono_work routine. When compiled with OpenACC enabled using the nvfortran compiler, running with 'config_split_dynamics_transport = false' in the namelist.atmsophere file results in a runtime error for rho_zz_int: FATAL ERROR: variable in data clause is partially present on the device: name=rho_zz_int(:,:) file:src/core_atmosphere/dynamics/mpas_atm_time_integration.F atm_advance_scalars_mono_work line:3942 The rho_zz_int array is only used if local_advance_density is true in the atm_advance_scalars_mono_work routine, and local_advance_density is true if and only if config_split_dynamics_transport is true. Consequently, simulations with 'config_split_dynamics_transport = false' in the namelist only allocate the rho_zz_int array with dimensions (1,1), rather than the full dimensions (nVertLevels,nCells+1) that are required when local_advance_density is true. This difference in the allocated dimensions of rho_zz_int apparently causes problems for the OpenACC runtime, which expects rho_zz_int to be allocated as indicated by the explicit-shape specification, dimension(nVertLevels,nCells+1), for the rho_zz_int dummy argument to atm_advance_scalars_mono_work. To work around the "partially present" error, this merge changes the rho_zz_int dummy argument to a deferred shape array, with dimension(:,:). * atmosphere/rho_zz_int_decl: Fix OpenACC partially present error for rho_zz_int in atm_advance_scalars_mono_work
2 parents 691c707 + 00342f1 commit f5d7c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core_atmosphere/dynamics/mpas_atm_time_integration.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4035,7 +4035,7 @@ subroutine atm_advance_scalars_mono_work(field_name, block, state, nCells, nEdge
40354035
integer, intent(in) :: cellSolveStart, cellSolveEnd
40364036
procedure (halo_exchange_routine) :: exchange_halo_group
40374037
logical, intent(in), optional :: advance_density
4038-
real (kind=RKIND), dimension(nVertLevels,nCells+1), intent(inout), optional :: rho_zz_int
4038+
real (kind=RKIND), dimension(:,:), intent(inout), optional :: rho_zz_int
40394039
40404040
integer :: ii,jj
40414041
integer, dimension(10) :: ica

0 commit comments

Comments
 (0)