Fix AHF crash under CUDA resident-sync mode
Download BSSN StateList from GPU to CPU before AHFinderDirect_find_horizons so that AH_Interp_Points reads valid field data instead of stale CPU arrays. The resident-sync path keeps canonical state on GPU; without this download the Newton iteration diverges and probes outside the computational domain. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -158,7 +158,7 @@ Detector_Rmax = 160.0 ## farest dector distance
|
|||||||
|
|
||||||
## Setting the apprent horizon
|
## Setting the apprent horizon
|
||||||
|
|
||||||
AHF_Find = "no" ## whether to find the apparent horizon: choose "yes" or "no"
|
AHF_Find = "yes" ## whether to find the apparent horizon: choose "yes" or "no"
|
||||||
|
|
||||||
AHF_Find_Every = 24
|
AHF_Find_Every = 24
|
||||||
AHF_Dump_Time = 20.0
|
AHF_Dump_Time = 20.0
|
||||||
|
|||||||
@@ -9402,6 +9402,13 @@ void bssn_class::AH_Step_Find(int lev, double dT_lev)
|
|||||||
xr[ihn] = yr[ihn] = zr[ihn] = 50;
|
xr[ihn] = yr[ihn] = zr[ihn] = 50;
|
||||||
// if(myrank==0) for(ihn=0;ihn<HN_num;ihn++) cout<<"trigger#"<<ihn<<": "<<trigger[ihn]<<endl;
|
// if(myrank==0) for(ihn=0;ihn<HN_num;ihn++) cout<<"trigger#"<<ihn<<": "<<trigger[ihn]<<endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if USE_CUDA_BSSN
|
||||||
|
if (bssn_cuda_use_resident_sync(lev))
|
||||||
|
{
|
||||||
|
for (int dl = 0; dl < GH->levels; dl++)
|
||||||
|
bssn_cuda_download_level_state_if_present(GH->PatL[dl], StateList, myrank);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
AHFinderDirect::AHFinderDirect_find_horizons(HN_num, dumpid,
|
AHFinderDirect::AHFinderDirect_find_horizons(HN_num, dumpid,
|
||||||
xc, yc, zc, xr, yr, zr, trigger, dTT);
|
xc, yc, zc, xr, yr, zr, trigger, dTT);
|
||||||
|
|||||||
Reference in New Issue
Block a user