Skip to content

Commit

Permalink
grid: Fix compatibility with GCC < 9
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jul 26, 2020
1 parent fb3a7dc commit 8aa10f2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/grid/grid_task_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,10 @@ static void collocate_one_grid_level(const intl_task_list_t* task_list,
const double dh_inv[3][3],
double* grid) {

#pragma omp parallel default(none) \
shared(task_list, first_task, last_task, orthorhombic, func) \
shared(npts_global, npts_local, shift_local, border, distributed) \
shared(dh, dh_inv, ncoset, grid)
{
// Using default(shared) because with GCC 9 the behavior around const changed:
// https://www.gnu.org/software/gcc/gcc-9/porting_to.html
#pragma omp parallel default(shared)
{

// Allocate thread local copy of the grid.
const size_t npts_local_total = npts_local[0] * npts_local[1] * npts_local[2];
Expand Down

0 comments on commit 8aa10f2

Please sign in to comment.