File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
components/eamxx/src/physics/mam Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -274,20 +274,25 @@ void MAMConstituentFluxes::run_impl(const double dt) {
274
274
// Compute vertical layer heights and updraft velocity. We need these to fully
275
275
// populate dry_atm_, so that we can form a HAERO atmosphere object. HAERO
276
276
// atmosphere object is used to for state%q like array.
277
+ // NOTE: We cannot pass a member of the interface class (in this case, MAMConstituentFluxes)
278
+ // inside a parallel_for. Instead, we must create a soft copy of each member.
279
+ const auto & wet_atm = wet_atm_;
280
+ const auto & dry_atm= dry_atm_;
281
+
277
282
auto lambda =
278
283
KOKKOS_LAMBDA (const Kokkos::TeamPolicy<KT::ExeSpace>::member_type &team) {
279
284
const int icol = team.league_rank (); // column index
280
- compute_dry_mixing_ratios (team, wet_atm_ , // in
281
- dry_atm_ , // out
285
+ compute_dry_mixing_ratios (team, wet_atm , // in
286
+ dry_atm , // out
282
287
icol); // in
283
288
team.team_barrier ();
284
289
// vertical heights has to be computed after computing dry mixing ratios
285
290
// for atmosphere
286
291
compute_vertical_layer_heights (team, // in
287
- dry_atm_ , // out
292
+ dry_atm , // out
288
293
icol); // in
289
- compute_updraft_velocities (team, wet_atm_ , // in
290
- dry_atm_ , // out
294
+ compute_updraft_velocities (team, wet_atm , // in
295
+ dry_atm , // out
291
296
icol); // in
292
297
};
293
298
// policy
You can’t perform that action at this time.
0 commit comments