Stabilize GPU output path and MPI sync
This commit is contained in:
@@ -17,6 +17,13 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
#error "Step_MainPath_GPU currently supports Patch grids only."
|
||||
#endif
|
||||
|
||||
if (bssn_gpu_bind_process_device(myrank))
|
||||
{
|
||||
cerr << "GPU device bind failure on MPI rank " << myrank << endl;
|
||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||
}
|
||||
bssn_gpu_clear_cached_device_buffers();
|
||||
|
||||
setpbh(BH_num, Porg0, Mass, BH_num_input);
|
||||
|
||||
const double dT_lev = dT * pow(0.5, Mymax(lev, trfls));
|
||||
@@ -150,6 +157,7 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
Parallel::AsyncSyncState async_pre;
|
||||
Parallel::Sync_start(GH->PatL[lev], SynchList_pre, Symmetry, sync_cache_pre[lev], async_pre);
|
||||
Parallel::Sync_finish(sync_cache_pre[lev], async_pre, SynchList_pre, Symmetry);
|
||||
bssn_gpu_clear_cached_device_buffers();
|
||||
|
||||
MPI_Wait(&err_req_pre, MPI_STATUS_IGNORE);
|
||||
if (ERROR)
|
||||
@@ -265,6 +273,7 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
Parallel::AsyncSyncState async_cor;
|
||||
Parallel::Sync_start(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_cor[lev], async_cor);
|
||||
Parallel::Sync_finish(sync_cache_cor[lev], async_cor, SynchList_cor, Symmetry);
|
||||
bssn_gpu_clear_cached_device_buffers();
|
||||
|
||||
MPI_Wait(&err_req_cor, MPI_STATUS_IGNORE);
|
||||
if (ERROR)
|
||||
@@ -334,6 +343,8 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
RestrictProlong(lev, YN, BB);
|
||||
#endif
|
||||
|
||||
bssn_gpu_clear_cached_device_buffers();
|
||||
|
||||
Pp = GH->PatL[lev];
|
||||
while (Pp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user