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:
@@ -9402,9 +9402,16 @@ void bssn_class::AH_Step_Find(int lev, double dT_lev)
|
||||
xr[ihn] = yr[ihn] = zr[ihn] = 50;
|
||||
// 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
|
||||
AHFinderDirect::AHFinderDirect_find_horizons(HN_num, dumpid,
|
||||
xc, yc, zc, xr, yr, zr, trigger, dTT);
|
||||
xc, yc, zc, xr, yr, zr, trigger, dTT);
|
||||
// note rhs and Gamijk have been used as temp storage space
|
||||
|
||||
if (myrank == 0)
|
||||
|
||||
Reference in New Issue
Block a user