diff --git a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp index 2217511b3fc8caf70b698a8c3bbfcaf041aa2b88..a7571e1a854da65d8ef9cb1adc8695a55ed6ead1 100644 --- a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp +++ b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp @@ -120,7 +120,7 @@ void multipleLevel(const std::string& configPath) bool useGridGenerator = true; bool useLevels = false; - std::string scalingType = "strong"; // "strong" // "weak" + std::string scalingType = "weak"; // "strong" // "weak" // bool useStreams = true; // para->useReducedCommunicationAfterFtoC = true; bool useStreams = para->getUseStreams(); @@ -252,13 +252,6 @@ void multipleLevel(const std::string& configPath) if (useLevels) { gridBuilder->addGeometry(new Sphere(0.0, 0.0, sideLengthCube, dSphere)); }else{ - // Sphere* sphere1 = new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphere); - // Sphere* sphere2 = new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 1.5 * sideLengthCube, dSphere); - // auto conglo = Conglomerate::makeShared(); - // conglo->add(sphere1); - // conglo->add(sphere2); - // gridBuilder->addGeometry(conglo.get()); - TriangularMesh *sphereSTL = TriangularMesh::make(stlPath + "Spheres_2GPU.stl"); gridBuilder->addGeometry(sphereSTL); } diff --git a/apps/gpu/LBM/SphereScaling/configPhoenix2GPU.txt b/apps/gpu/LBM/SphereScaling/configPhoenix2GPU.txt index b33d3d62137d2a1b41e774abe8a655a5016157cb..9e88253b040bcab5ec1349e701a800841fba6f3a 100644 --- a/apps/gpu/LBM/SphereScaling/configPhoenix2GPU.txt +++ b/apps/gpu/LBM/SphereScaling/configPhoenix2GPU.txt @@ -36,6 +36,6 @@ GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling2GPU/ ################################################## #simulation parameter ################################################## -TimeEnd=100000 -TimeOut=100000 +TimeEnd=1000 +TimeOut=1000 #TimeStartOut=0 \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling/configPhoenix4GPU_1LevStrongStream.txt b/apps/gpu/LBM/SphereScaling/configPhoenix4GPU_1LevStrongStream.txt new file mode 100644 index 0000000000000000000000000000000000000000..bee8171689c4dfbee2da7a4247bd2f43b3204b6b --- /dev/null +++ b/apps/gpu/LBM/SphereScaling/configPhoenix4GPU_1LevStrongStream.txt @@ -0,0 +1,42 @@ +################################################## +#GPU Mapping +################################################## +Devices="0 1 2 3" +NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +Path=/work/y0078217/Results/SphereScalingResults/4GPU/1LevStrongStream/ +#Path="F:/Work/Computations/out/SphereScaling/" +#Prefix="SphereScaling" +#WriteGrid=true +################################################## +#informations for reading +################################################## +GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling4GPU/ +#GridPath="C:" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantK17CompChim + +################################################## +#simulation parameter +################################################## +TimeEnd=100 +TimeOut=100 +#TimeStartOut=0 + +################################################## +# CUDA Streams and optimized communication (only used for multiple GPUs) +################################################## +useStreams = true +useReducedCommunicationInInterpolation = true \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevStrongStream.txt b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevStrongStream.txt index 2715162f6c5bdd90908bf19d775d1f3e3dd4a52d..85dc351c94f1b41b88c83932ca010de87c646030 100644 --- a/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevStrongStream.txt +++ b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevStrongStream.txt @@ -31,8 +31,8 @@ GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling8GPU/ ################################################## #simulation parameter ################################################## -TimeEnd=100000 -TimeOut=100000 +TimeEnd=100 +TimeOut=100 #TimeStartOut=0 ################################################## diff --git a/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakOS.txt b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakOS.txt new file mode 100644 index 0000000000000000000000000000000000000000..ae848a2889d1301de78c6fff42e045965fa9baf7 --- /dev/null +++ b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakOS.txt @@ -0,0 +1,42 @@ +################################################## +#GPU Mapping +################################################## +Devices="0 1 2 3" +NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +Path=/work/y0078217/Results/SphereScalingResults/8GPU/1LevWeakOS/ +#Path="F:/Work/Computations/out/SphereScaling/" +#Prefix="SphereScaling" +#WriteGrid=true +################################################## +#informations for reading +################################################## +GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling8GPU/ +#GridPath="C:" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantK17CompChim + +################################################## +#simulation parameter +################################################## +TimeEnd=100000 +TimeOut=100000 +#TimeStartOut=0 + +################################################## +# CUDA Streams and optimized communication (only used for multiple GPUs) +################################################## +useStreams = false +useReducedCommunicationInInterpolation = false \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakStream.txt b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakStream.txt new file mode 100644 index 0000000000000000000000000000000000000000..eeea0129549d2113bd7883824034a9b1f58ce3c7 --- /dev/null +++ b/apps/gpu/LBM/SphereScaling/configPhoenix8GPU_1LevWeakStream.txt @@ -0,0 +1,42 @@ +################################################## +#GPU Mapping +################################################## +Devices="0 1 2 3" +NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +Path=/work/y0078217/Results/SphereScalingResults/8GPU/1LevWeakStream/ +#Path="F:/Work/Computations/out/SphereScaling/" +#Prefix="SphereScaling" +#WriteGrid=true +################################################## +#informations for reading +################################################## +GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling8GPU/ +#GridPath="C:" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantK17CompChim + +################################################## +#simulation parameter +################################################## +TimeEnd=100000 +TimeOut=100000 +#TimeStartOut=0 + +################################################## +# CUDA Streams and optimized communication (only used for multiple GPUs) +################################################## +useStreams = true +useReducedCommunicationInInterpolation = true \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp b/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp index e97e5bb9bb8c320ea6e1594cb40d0269da00ce74..1edaceff8b53c1b85229948fa4e5aad87d585702 100644 --- a/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp +++ b/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp @@ -120,7 +120,7 @@ void multipleLevel(const std::string& configPath) bool useGridGenerator = true; bool useLevels = true; - std::string scalingType = "weak"; // "strong" // "weak" + std::string scalingType = "strong"; // "strong" // "weak" // bool useStreams = true; // para->useReducedCommunicationAfterFtoC = true; bool useStreams = para->getUseStreams(); @@ -223,19 +223,19 @@ void multipleLevel(const std::string& configPath) gridBuilder->setNumberOfLayers(10, 8); if (comm->getNummberOfProcess() == 2) { - real zSplit = 0.5 * sideLengthCube; + real xSplit = 0.5 * sideLengthCube; if (scalingType == "weak"){ - zSplit = zGridMax; - zGridMax = zGridMax + sideLengthCube; + xSplit = xGridMax; + xGridMax = xGridMax + sideLengthCube; } if (generatePart == 0) { - gridBuilder->addCoarseGrid(xGridMin, yGridMin, zGridMin, xGridMax, yGridMax, zSplit + overlap, + gridBuilder->addCoarseGrid(xGridMin, yGridMin, zGridMin, xSplit + overlap, yGridMax, zGridMax, dxGrid); } if (generatePart == 1) { - gridBuilder->addCoarseGrid(xGridMin, yGridMin, zSplit - overlap, xGridMax, yGridMax, zGridMax, + gridBuilder->addCoarseGrid(xSplit-overlap, yGridMin, zGridMin, xGridMax, yGridMax, zGridMax, dxGrid); } @@ -243,22 +243,15 @@ void multipleLevel(const std::string& configPath) if (scalingType == "strong"){ gridBuilder->addGrid(new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphereLev1), 1); } else if (scalingType == "weak"){ - gridBuilder->addGrid(new Cuboid( -0.5*dCubeLev1, -0.5*dCubeLev1, sideLengthCube-0.5*dCubeLev1, - 0.5*dCubeLev1, 0.5*dCubeLev1, sideLengthCube+0.5*dCubeLev1),1); + gridBuilder->addGrid(new Cuboid( sideLengthCube-0.5*dCubeLev1, -0.5*dCubeLev1, -0.5*dCubeLev1, + sideLengthCube+0.5*dCubeLev1, 0.5*dCubeLev1, 0.5*dCubeLev1),1); } } if (scalingType == "weak"){ if (useLevels) { - gridBuilder->addGeometry(new Sphere(0.0, 0.0, sideLengthCube, dSphere)); + gridBuilder->addGeometry(new Sphere(sideLengthCube, 0.0, 0.0, dSphere)); }else{ - // Sphere* sphere1 = new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphere); - // Sphere* sphere2 = new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 1.5 * sideLengthCube, dSphere); - // auto conglo = Conglomerate::makeShared(); - // conglo->add(sphere1); - // conglo->add(sphere2); - // gridBuilder->addGeometry(conglo.get()); - TriangularMesh *sphereSTL = TriangularMesh::make(stlPath + "Spheres_2GPU.stl"); gridBuilder->addGeometry(sphereSTL); } @@ -268,33 +261,33 @@ void multipleLevel(const std::string& configPath) if (generatePart == 0) gridBuilder->setSubDomainBox( - std::make_shared<BoundingBox>(xGridMin, xGridMax, yGridMin, yGridMax, zGridMin, zSplit)); + std::make_shared<BoundingBox>(xGridMin, xSplit, yGridMin, yGridMax, zGridMin, zGridMax)); if (generatePart == 1) gridBuilder->setSubDomainBox( - std::make_shared<BoundingBox>(xGridMin, xGridMax, yGridMin, yGridMax, zSplit, zGridMax)); + std::make_shared<BoundingBox>(xSplit, xGridMax, yGridMin, yGridMax, zGridMin, zGridMax)); gridBuilder->buildGrids(LBM, true); // buildGrids() has to be called before setting the BCs!!!! if (generatePart == 0) { - gridBuilder->findCommunicationIndices(CommunicationDirections::PZ, LBM); - gridBuilder->setCommunicationProcess(CommunicationDirections::PZ, 1); + gridBuilder->findCommunicationIndices(CommunicationDirections::PX, LBM); + gridBuilder->setCommunicationProcess(CommunicationDirections::PX, 1); } if (generatePart == 1) { - gridBuilder->findCommunicationIndices(CommunicationDirections::MZ, LBM); - gridBuilder->setCommunicationProcess(CommunicationDirections::MZ, 0); + gridBuilder->findCommunicationIndices(CommunicationDirections::MX, LBM); + gridBuilder->setCommunicationProcess(CommunicationDirections::MX, 0); } gridBuilder->setPeriodicBoundaryCondition(false, false, false); ////////////////////////////////////////////////////////////////////////// - gridBuilder->setVelocityBoundaryCondition(SideType::MX, vxLB, 0.0, 0.0); gridBuilder->setVelocityBoundaryCondition(SideType::MY, vxLB, 0.0, 0.0); gridBuilder->setVelocityBoundaryCondition(SideType::PY, vxLB, 0.0, 0.0); + gridBuilder->setVelocityBoundaryCondition(SideType::MZ, vxLB, 0.0, 0.0); + gridBuilder->setVelocityBoundaryCondition(SideType::PZ, vxLB, 0.0, 0.0); if (generatePart == 0) - gridBuilder->setVelocityBoundaryCondition(SideType::MZ, vxLB, 0.0, 0.0); - if (generatePart == 1) - gridBuilder->setVelocityBoundaryCondition(SideType::PZ, vxLB, 0.0, 0.0); - gridBuilder->setPressureBoundaryCondition(SideType::PX, 0.0); // set pressure BC after velocity BCs + gridBuilder->setVelocityBoundaryCondition(SideType::MX, vxLB, 0.0, 0.0); + if (generatePart == 1) + gridBuilder->setPressureBoundaryCondition(SideType::PX, 0.0); // set pressure BC after velocity BCs // gridBuilder->setVelocityBoundaryCondition(SideType::GEOMETRY, 0.0, 0.0, 0.0); ////////////////////////////////////////////////////////////////////////// diff --git a/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongOS.txt b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongOS.txt new file mode 100644 index 0000000000000000000000000000000000000000..b650042a8b0192759cfd72c4b40d9bff1df89a4e --- /dev/null +++ b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongOS.txt @@ -0,0 +1,42 @@ +################################################## +#GPU Mapping +################################################## +Devices="0 1 2 3" +NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +Path=/work/y0078217/Results/SphereScalingResults/8GPU/2LevStrongOS/ +#Path="F:/Work/Computations/out/SphereScaling/" +#Prefix="SphereScaling" +#WriteGrid=true +################################################## +#informations for reading +################################################## +GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling8GPU/ +#GridPath="C:" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantK17CompChim + +################################################## +#simulation parameter +################################################## +TimeEnd=100000 +TimeOut=100000 +#TimeStartOut=0 + +################################################## +# CUDA Streams and optimized communication (only used for multiple GPUs) +################################################## +useStreams = false +useReducedCommunicationInInterpolation = false \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongStream.txt b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongStream.txt new file mode 100644 index 0000000000000000000000000000000000000000..7f988e3259fb11ffdff44702fb252bc58d54d80a --- /dev/null +++ b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevStrongStream.txt @@ -0,0 +1,42 @@ +################################################## +#GPU Mapping +################################################## +Devices="0 1 2 3" +NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +Path=/work/y0078217/Results/SphereScalingResults/8GPU/2LevStrongStream/ +#Path="F:/Work/Computations/out/SphereScaling/" +#Prefix="SphereScaling" +#WriteGrid=true +################################################## +#informations for reading +################################################## +GridPath=/work/y0078217/Grids/GridSphereScaling/SphereScaling8GPU/ +#GridPath="C:" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantK17CompChim + +################################################## +#simulation parameter +################################################## +TimeEnd=100000 +TimeOut=100000 +#TimeStartOut=0 + +################################################## +# CUDA Streams and optimized communication (only used for multiple GPUs) +################################################## +useStreams = true +useReducedCommunicationInInterpolation = true \ No newline at end of file diff --git a/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevWeakStream.txt b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevWeakStream.txt index 714298741be1f37911c25efede7b8186323dd78c..ed85622c9c90e774f4690d24c4eee8e063c83fd7 100644 --- a/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevWeakStream.txt +++ b/apps/gpu/LBM/SphereScaling1/configPhoenix8GPU_2LevWeakStream.txt @@ -1,13 +1,13 @@ ################################################## #GPU Mapping ################################################## -Devices="0 1 2 3 4 5 6 7" -NumberOfDevices=8 +Devices="0 1 2 3" +NumberOfDevices=4 ################################################## #informations for Writing ################################################## -Path=/work/y0078217/Results/SphereScalingResults/8GPU/1LevWeakStream/ +Path=/work/y0078217/Results/SphereScalingResults/8GPU/2LevWeakStream/ #Path="F:/Work/Computations/out/SphereScaling/" #Prefix="SphereScaling" #WriteGrid=true