Fix OpenACC partially present error for rho_zz_int in atm_advance_scalars_mono_work #1330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR 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
nvfortrancompiler, running withconfig_split_dynamics_transport = falsein thenamelist.atmsopherefile results in a runtime error forrho_zz_int:The
rho_zz_intarray is only used iflocal_advance_densityis.true.in theatm_advance_scalars_mono_workroutine, andlocal_advance_densityis true if and only ifconfig_split_dynamics_transportis true.Consequently, simulations with
config_split_dynamics_transport = falsein the namelist only allocate therho_zz_intarray with dimensions(1,1), rather than the full dimensions(nVertLevels,nCells+1)that are required whenlocal_advance_densityis true.This difference in the allocated dimensions of
rho_zz_intapparently causes problems for the OpenACC runtime, which expectsrho_zz_intto be allocated as indicated by the explicit-shape specification,dimension(nVertLevels,nCells+1), for therho_zz_intdummy argument toatm_advance_scalars_mono_work.To work around the "partially present" error, this PR changes the
rho_zz_intdummy argument to a deferred shape array, withdimension(:,:).