From c60bc03664f1719d821e7d6fd566673224cd5d16 Mon Sep 17 00:00:00 2001 From: ianchb Date: Fri, 24 Apr 2026 21:06:13 +0800 Subject: [PATCH] Also disable cached sync for Z4C --- AMSS_NCKU_source/bssn_class.C | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/AMSS_NCKU_source/bssn_class.C b/AMSS_NCKU_source/bssn_class.C index 376df07..b9ba856 100644 --- a/AMSS_NCKU_source/bssn_class.C +++ b/AMSS_NCKU_source/bssn_class.C @@ -2489,7 +2489,7 @@ void bssn_class::Evolve(int Steps) GH->Regrid(Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_mon, StartTime, dT_mon / 2), ErrorMonitor); -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif STEP_TIMER_ADD(TB_REGRID, timer_regrid); @@ -2732,7 +2732,7 @@ void bssn_class::RecursiveStep(int lev) { if (ConstraintRefreshLevels) ConstraintRefreshLevels[lev] = 1; -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif } @@ -2915,7 +2915,7 @@ void bssn_class::ParallelStep() if (GH->Regrid_Onelevel(GH->mylev, Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor)) -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif #endif @@ -3084,7 +3084,7 @@ void bssn_class::ParallelStep() if (GH->Regrid_Onelevel(lev + 1, Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_levp1, StartTime, dT_levp1 / 2), ErrorMonitor)) -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif @@ -3101,7 +3101,7 @@ void bssn_class::ParallelStep() if (GH->Regrid_Onelevel(lev, Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor)) -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif @@ -3122,7 +3122,7 @@ void bssn_class::ParallelStep() if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor)) -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif @@ -3140,7 +3140,7 @@ void bssn_class::ParallelStep() if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0, SynchList_cor, OldStateList, StateList, SynchList_pre, fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor)) -#if (ABEtype != 1) +#if (ABEtype != 1 && ABEtype != 2) for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); } #endif @@ -6127,7 +6127,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, // // SynchList_cor old ----------- { -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) #if (PSTR == 1 || PSTR == 2) // stringstream a_stream; // a_stream.setf(ios::left); @@ -6255,7 +6255,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, #endif #if (RPB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry); #else Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry, sync_cache_restrict[lev]); @@ -6272,7 +6272,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, // misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str()); #endif -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev - 1], SynchList_pre, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev - 1], SynchList_pre, Symmetry, sync_cache_rp_coarse[lev]); @@ -6287,7 +6287,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, #if (RPB == 0) #if (MIXOUTB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Ppc = GH->PatL[lev - 1]; while (Ppc) { @@ -6328,7 +6328,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, #endif #if (RPB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry); #else Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry, sync_cache_restrict[lev]); @@ -6345,7 +6345,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, // misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str()); #endif -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev - 1], SL, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev - 1], SL, Symmetry, sync_cache_rp_coarse[lev]); @@ -6360,7 +6360,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB, #if (RPB == 0) #if (MIXOUTB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Ppc = GH->PatL[lev - 1]; while (Ppc) { @@ -6420,7 +6420,7 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB, // // SynchList_cor old ----------- { -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) if (lev >= GH->levels - 1) return; lev = lev + 1; @@ -6572,7 +6572,7 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB, #endif } -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev], SL, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev], SL, Symmetry, sync_cache_rp_fine[lev]); @@ -6590,7 +6590,7 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB, void bssn_class::RestrictProlong(int lev, int YN, bool BB) { double dT_lev = dT * pow(0.5, Mymax(lev, trfls)); -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) if (lev > 0) { MyList *Pp, *Ppc; @@ -6708,7 +6708,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) } #if (RPB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, Symmetry); #else Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, Symmetry, sync_cache_restrict[lev]); @@ -6718,7 +6718,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, GH->rsul[lev], Symmetry); #endif -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev - 1], SynchList_pre, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev - 1], SynchList_pre, Symmetry, sync_cache_rp_coarse[lev]); @@ -6726,7 +6726,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) #if (RPB == 0) #if (MIXOUTB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Ppc = GH->PatL[lev - 1]; while (Ppc) { @@ -6754,7 +6754,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) if (myrank == 0) cout << "===: " << GH->Lt[lev - 1] << "," << GH->Lt[lev] + dT_lev << endl; #if (RPB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry); #else Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry, sync_cache_restrict[lev]); @@ -6764,7 +6764,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, GH->rsul[lev], Symmetry); #endif -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev - 1], StateList, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev - 1], StateList, Symmetry, sync_cache_rp_coarse[lev]); @@ -6772,7 +6772,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) #if (RPB == 0) #if (MIXOUTB == 0) -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Ppc = GH->PatL[lev - 1]; while (Ppc) { @@ -6796,7 +6796,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB) #endif } -#if (ABEtype == 1) +#if (ABEtype == 1 || ABEtype == 2) Parallel::Sync(GH->PatL[lev], SynchList_cor, Symmetry); #else Parallel::Sync_cached(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_rp_fine[lev]);