Skip to content
Snippets Groups Projects
Commit 94b9097a authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Fix some bugs in f to c

parent 6e336d0a
No related branches found
No related tags found
1 merge request!104Add Communication Hiding to GPU version
......@@ -118,7 +118,7 @@ void multipleLevel(const std::string& configPath)
std::string bivalveType = "MUSSEL"; // "MUSSEL" "OYSTER"
std::string gridPath(gridPathParent + bivalveType); // only for GridGenerator, for GridReader the gridPath needs to be set in the config file
real dxGrid = (real)1.0;
real dxGrid = (real)2.0;
real vxLB = (real)0.051; // LB units
real Re = (real)300.0;
real viscosityLB = (vxLB * dxGrid) / Re;
......@@ -155,9 +155,9 @@ void multipleLevel(const std::string& configPath)
para->setMaxLevel(1);
//para->setMainKernel("CumulantK17CompChim");
if (useStreams)
para->setUseStreams();
//para->setMainKernel("CumulantK17CompChim");
para->setMainKernel("CumulantK17CompChimStream");
*logging::out << logging::Logger::INFO_HIGH << "Kernel: " << para->getMainKernel() << "\n";
......
......@@ -1151,7 +1151,7 @@ void fineToCoarseUsingIndex(Parameter *para, int level, uint *fluidNodeIndices,
para->getParD(level)->intFC.ICellFCC, para->getParD(level)->intFC.ICellFCF, para->getParD(level)->K_FC,
para->getParD(level)->omega, para->getParD(level + 1)->omega, para->getParD(level)->vis,
para->getParD(level)->nx, para->getParD(level)->ny, para->getParD(level + 1)->nx, para->getParD(level + 1)->ny,
para->getParD(level)->offFC, fluidNodeIndices, numberOfFluidNodes, stream);
para->getParD(level)->numberofthreads, para->getParD(level)->offFC, fluidNodeIndices, numberOfFluidNodes, stream);
getLastCudaError("ScaleFC27_RhoSq_comp_Stream execution failed");
//////////////////////////////////////////////////////////////////////////
......
......@@ -2115,6 +2115,7 @@ extern "C" void ScaleFC_RhoSq_comp_27_Stream( real* DC,
unsigned int nyC,
unsigned int nxF,
unsigned int nyF,
unsigned int numberOfThreads,
OffFC offFC,
unsigned int *fluidNodeIndices,
unsigned int numberOfFluidNodes,
......
......@@ -6242,7 +6242,7 @@ extern "C" void ScaleFC_RhoSq_comp_27(real* DC,
offFC);
getLastCudaError("scaleFC_RhoSq_27 execution failed");
}
extern "C" void ScaleFC_RhoSq_comp_27_Stream(real *DC,
extern "C" void ScaleFC_RhoSq_comp_27_Stream(real * DC,
real * DF,
unsigned int * neighborCX,
unsigned int * neighborCY,
......@@ -6263,12 +6263,13 @@ extern "C" void ScaleFC_RhoSq_comp_27_Stream(real *DC,
unsigned int nyC,
unsigned int nxF,
unsigned int nyF,
unsigned int numberOfThreads,
OffFC offFC,
unsigned int *fluidNodeIndices,
unsigned int numberOfFluidNodes,
CUstream_st* stream)
{
int Grid = (kFC / numberOfFluidNodes) + 1;
int Grid = (kFC / numberOfThreads) + 1;
int Grid1, Grid2;
if (Grid > 512) {
Grid1 = 512;
......@@ -6278,11 +6279,11 @@ extern "C" void ScaleFC_RhoSq_comp_27_Stream(real *DC,
Grid2 = Grid;
}
dim3 gridINT_FC(Grid1, Grid2);
dim3 threads(numberOfFluidNodes, 1, 1);
dim3 threads(numberOfThreads, 1, 1);
scaleFC_RhoSq_comp_27_Stream<<<gridINT_FC, threads, 0, stream>>>(DC, DF, neighborCX, neighborCY, neighborCZ, neighborFX, neighborFY, neighborFZ, size_MatC, size_MatF, evenOrOdd,
scaleFC_RhoSq_comp_27_Stream<<<gridINT_FC, threads, 0 , stream>>>(DC, DF, neighborCX, neighborCY, neighborCZ, neighborFX, neighborFY, neighborFZ, size_MatC, size_MatF, evenOrOdd,
posC, posFSWB, kFC, omCoarse, omFine, nu, nxC, nyC, nxF, nyF, offFC, fluidNodeIndices, numberOfFluidNodes);
getLastCudaError("scaleFC_RhoSq_27_Stream execution failed");
getLastCudaError("scaleFC_RhoSq_comp_27_Stream execution failed");
}
//////////////////////////////////////////////////////////////////////////
extern "C" void ScaleFC_RhoSq_3rdMom_comp_27( real* DC,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment