From d2a765412e571866995def33873f9504ad14e222 Mon Sep 17 00:00:00 2001 From: Liwei Ji Date: Wed, 17 Jul 2024 22:27:52 -0400 Subject: [PATCH 1/2] WeylScal4: disable omp for --- WeylScal4/src/WeylScal4_psi4_calc_4th.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/WeylScal4/src/WeylScal4_psi4_calc_4th.cc b/WeylScal4/src/WeylScal4_psi4_calc_4th.cc index bb901b59..70dcc09e 100644 --- a/WeylScal4/src/WeylScal4_psi4_calc_4th.cc +++ b/WeylScal4/src/WeylScal4_psi4_calc_4th.cc @@ -1,5 +1,6 @@ /* File produced by Kranc */ +#define CCTK_LOOP_DISABLE_PRAGMA_OMP #define KRANC_C #include From a5568f2b7de58f25c7fa795f28cfacfdb37097dd Mon Sep 17 00:00:00 2001 From: Liwei Ji Date: Thu, 18 Jul 2024 16:31:20 -0400 Subject: [PATCH 2/2] WeylScal4: add correct support for tiling --- WeylScal4/src/WeylScal4_psi4_calc_4th.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WeylScal4/src/WeylScal4_psi4_calc_4th.cc b/WeylScal4/src/WeylScal4_psi4_calc_4th.cc index 70dcc09e..675ca061 100644 --- a/WeylScal4/src/WeylScal4_psi4_calc_4th.cc +++ b/WeylScal4/src/WeylScal4_psi4_calc_4th.cc @@ -102,12 +102,12 @@ static void WeylScal4_psi4_calc_4th_Body(const cGH* restrict const cctkGH, const /* Calculate temporaries and arrays functions */ /* Copy local copies back to grid functions */ /* Loop over the grid points */ - const int imin0=imin[0]; - const int imin1=imin[1]; - const int imin2=imin[2]; - const int imax0=imax[0]; - const int imax1=imax[1]; - const int imax2=imax[2]; + const int imin0=std::max(imin[0], cctk_tile_min[0]); + const int imin1=std::max(imin[1], cctk_tile_min[1]); + const int imin2=std::max(imin[2], cctk_tile_min[2]); + const int imax0=std::min(imax[0], cctk_tile_max[0]); + const int imax1=std::min(imax[1], cctk_tile_max[1]); + const int imax2=std::min(imax[2], cctk_tile_max[2]); //#pragma omp parallel CCTK_LOOP3(WeylScal4_psi4_calc_4th, i,j,k, imin0,imin1,imin2, imax0,imax1,imax2,