Skip to content

Commit

Permalink
Modified pragmas for module_mixing_help().
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Jan 17, 2024
1 parent a68d538 commit 631e8c9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/trac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2010,10 +2010,16 @@ void module_mixing_help(
cmean[idx] += atm->q[qnt_idx][ip];
count[idx]++;
}
for (int i = 0; i < ctl->mixing_nx * ctl->mixing_ny * ctl->mixing_nz; i++)
if (count[i] > 0)
cmean[i] /= count[i];

#ifndef __GNUC__
#pragma novector
#endif
{
#pragma omp parallel for
for (int i = 0; i < ctl->mixing_nx * ctl->mixing_ny * ctl->mixing_nz; i++)
if (count[i] > 0)
cmean[i] /= count[i];
}

/* Calculate interparcel mixing... */
#pragma omp parallel for default(shared)
for (int ip = 0; ip < atm->np; ip++)
Expand Down

0 comments on commit 631e8c9

Please sign in to comment.