From 30c48304ca0c5e6600ec6729cddb11588f0278f5 Mon Sep 17 00:00:00 2001
From: dy94rovu <ravi.k.ayyala@fau.de>
Date: Fri, 28 Mar 2025 11:33:58 +0100
Subject: [PATCH] timers added for total simulation time and parameters updated
 for lss-rdm

---
 .../two_way_coupling/MaterialTransport.cpp         | 14 +++++++++++++-
 .../two_way_coupling/benchmark3D.prm               | 10 +++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/apps/benchmarks/MaterialTransport/two_way_coupling/MaterialTransport.cpp b/apps/benchmarks/MaterialTransport/two_way_coupling/MaterialTransport.cpp
index fac75017a..8d61127b0 100644
--- a/apps/benchmarks/MaterialTransport/two_way_coupling/MaterialTransport.cpp
+++ b/apps/benchmarks/MaterialTransport/two_way_coupling/MaterialTransport.cpp
@@ -206,7 +206,7 @@ int main(int argc, char** argv) {
    WALBERLA_LOG_INFO_ON_ROOT("Rayleigh number is "<< RayleighNumber);
    WALBERLA_LOG_INFO_ON_ROOT("Characteristic velocity is "<< uchar << " " << uCharacteristicLB );
    WALBERLA_LOG_INFO_ON_ROOT("Mach number is "<< machnumber);
-   WALBERLA_LOG_INFO_ON_ROOT("Square domain size is "<< domainSizeLB[0]);
+   WALBERLA_LOG_INFO_ON_ROOT("Domain size is "<< domainSizeLB[0] << " " << domainSizeLB[1] << " " << domainSizeLB[2]);
    WALBERLA_LOG_INFO_ON_ROOT("alpha LB is "<< alphaLB);
    WALBERLA_LOG_INFO_ON_ROOT("gravity LB is "<< gravityLB);
    WALBERLA_LOG_INFO_ON_ROOT("Temperature difference delta_t is "<< delta_T);
@@ -537,12 +537,24 @@ auto communication_fluid = std::function< void() >([&]() { com_fluid.communicate
 
 
    WcTimingPool timeloopTiming;
+   WcTimer simTimer;
+
+   simTimer.start();
+
+
    // TODO: maybe add warmup phase
    for (uint_t timeStep = 0; timeStep < timeSteps; ++timeStep)
    {
       if (useCommunicationHiding) { commTimeloop.singleStep(timeloopTiming); }
       timeloop.singleStep(timeloopTiming);
    }
+   simTimer.end();
+   WALBERLA_LOG_INFO_ON_ROOT("Simulation finished")
+   double time = simTimer.max();
+   WALBERLA_MPI_SECTION() { walberla::mpi::reduceInplace(time, walberla::mpi::MAX); }
+   WALBERLA_LOG_INFO_ON_ROOT("Hidalgo total simulation time is " << time);
+
+
 
    /*std::vector< real_t > nusseltNumbers = NusseltNumbers(blocks,
                   densityConcentrationFieldID,velFieldFluidCPUGPUID,simulationDomain,
diff --git a/apps/benchmarks/MaterialTransport/two_way_coupling/benchmark3D.prm b/apps/benchmarks/MaterialTransport/two_way_coupling/benchmark3D.prm
index 83d4ee18c..bbbe69483 100644
--- a/apps/benchmarks/MaterialTransport/two_way_coupling/benchmark3D.prm
+++ b/apps/benchmarks/MaterialTransport/two_way_coupling/benchmark3D.prm
@@ -6,8 +6,8 @@ NumericalSetup
     numYBlocks 1;
     numZBlocks 1;
 
-    cellsPerBlockPerDirectionX 128;
-    cellsPerBlockPerDirectionY 128;
+    cellsPerBlockPerDirectionX 256;
+    cellsPerBlockPerDirectionY 512;
     cellsPerBlockPerDirectionZ 128;
 
     periodicInY false;
@@ -16,7 +16,7 @@ NumericalSetup
     tSI 15;
     gravity 9.81;
 
-    sendDirectlyFromGPU false; // use GPU-GPU communication
+    sendDirectlyFromGPU true; // use GPU-GPU communication
     useCommunicationHiding false;
     frameWidth <1, 1, 1>; // width of the outer region if splitting the LBM/PSM into inner and outer (only used if useCommunicationHiding is true)
 
@@ -27,7 +27,7 @@ NumericalSetup
     Mach 0.01;
     relaxationRate 1.5;
 
-    timeSteps 50000;
+    timeSteps 1000;
 }
 
 Output
@@ -35,5 +35,5 @@ Output
     vtkSpacing 0;
     vtkFolder vtk_out_3D;
 
-    performanceLogFrequency 5000;
+    performanceLogFrequency 1000;
 }
-- 
GitLab