From dafce4df853beb5c97ff68bf7e783b55cd0cc977 Mon Sep 17 00:00:00 2001
From: Anna Wellmann <a.wellmann@tu-bs.de>
Date: Mon, 13 Dec 2021 11:43:20 +0100
Subject: [PATCH] Fix bug by adding cudaDeviceSynchronize()

The scaling coarse to fine for bulk nodes should not overlap with the collision kernel for boder nodes on the fine level .
---
 src/gpu/VirtualFluids_GPU/Calculation/UpdateGrid27.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gpu/VirtualFluids_GPU/Calculation/UpdateGrid27.cpp b/src/gpu/VirtualFluids_GPU/Calculation/UpdateGrid27.cpp
index 3aee6c46b..6064f37cf 100644
--- a/src/gpu/VirtualFluids_GPU/Calculation/UpdateGrid27.cpp
+++ b/src/gpu/VirtualFluids_GPU/Calculation/UpdateGrid27.cpp
@@ -81,6 +81,7 @@ void UpdateGrid27::refinementAndExchange_streams(int level)
     coarseToFineWithStream(para.get(), level, para->getParD(level)->intCFBorder.ICellCFC,
                            para->getParD(level)->intCFBorder.ICellCFF, para->getParD(level)->intCFBorder.kCF, para->getParD(level)->offCF,
                            borderStreamIndex);
+    cudaDeviceSynchronize(); 
 }
 
 void UpdateGrid27::refinementAndExchange_noStreams_onlyExchangeInterface(int level)
-- 
GitLab