From 08efd10a756d3aa3285928fd87f93450754e6d1e Mon Sep 17 00:00:00 2001
From: Berenger Bramas <Berenger.Bramas@inria.fr>
Date: Tue, 18 Mar 2025 18:42:40 +0100
Subject: [PATCH] debug starpu bench

---
 Batch/run-benchs-omp-starpu.sh                       | 12 ++++++++----
 Benchmark/particles_starpu/particles-simu-starpu.cpp |  5 +++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Batch/run-benchs-omp-starpu.sh b/Batch/run-benchs-omp-starpu.sh
index 0aa7d33..aa36e0c 100644
--- a/Batch/run-benchs-omp-starpu.sh
+++ b/Batch/run-benchs-omp-starpu.sh
@@ -25,7 +25,7 @@ function main(){
     fi
     
     cd "$RUN_DIR"
-    cmake .. -DSPECX_COMPILE_WITH_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=$SMPREFIX -DCMAKE_BUILD_TYPE=RelWithDebInfo # RelWithDebInfo
+    cmake .. -DSPECX_COMPILE_WITH_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=$SMPREFIX -DCMAKE_BUILD_TYPE=RELEASE # RelWithDebInfo
 
     ## Redirect std and error to file 
     make -j > build.log 2>&1
@@ -57,12 +57,16 @@ function main(){
     "$RUN_DIR/Benchmark/particles/particles-simu" --lp=$NB_LOOPS --minp=500 --maxp=512 --minnbgroups=128 --maxnbgroups=256 --od="$results_dir" >> "$results_dir/output_particles.txt"
     remove_core_files
     
-    # Particles
+    # Particles omp
     "$RUN_DIR/Benchmark/particles/particles-simu-omp" --lp=$NB_LOOPS --minp=500 --maxp=512 --minnbgroups=128 --maxnbgroups=256 --od="$results_dir" >> "$results_dir/output_particles_omp.txt"
     remove_core_files
     
-    # Particles omp starpu
-    "$RUN_DIR/Benchmark/particles/particles-simu-starpu" --lp=$NB_LOOPS --minp=500 --maxp=512 --minnbgroups=128 --maxnbgroups=256 --od="$results_dir" >> "$results_dir/output_particles_starpu.txt"
+    # Particles starpu lws
+    STARPU_SCHED=lws "$RUN_DIR/Benchmark/particles/particles-simu-starpu" --lp=$NB_LOOPS --minp=500 --maxp=512 --minnbgroups=128 --maxnbgroups=256 --od="$results_dir" >> "$results_dir/output_particles_starpu_lws.txt"
+    remove_core_files
+    
+    # Particles starpu dmda
+    STARPU_SCHED=dmda "$RUN_DIR/Benchmark/particles/particles-simu-starpu" --lp=$NB_LOOPS --minp=500 --maxp=512 --minnbgroups=128 --maxnbgroups=256 --od="$results_dir" >> "$results_dir/output_particles_starpu_dmda.txt"
     remove_core_files
 }
 
diff --git a/Benchmark/particles_starpu/particles-simu-starpu.cpp b/Benchmark/particles_starpu/particles-simu-starpu.cpp
index 1407d65..c166bd5 100644
--- a/Benchmark/particles_starpu/particles-simu-starpu.cpp
+++ b/Benchmark/particles_starpu/particles-simu-starpu.cpp
@@ -659,9 +659,10 @@ void BenchmarkTest(int argc, char** argv, const TuneResult& inKernelConfig){
         }
     }
 
-    std::ofstream file(outputDir + "/particle-simu-omp.csv");
+    const std::string csvfilename = outputDir + "/particle-simu-starpu"+ (getenv("STARPU_SCHED")?getenv("STARPU_SCHED"):"default") +".csv";
+    std::ofstream file(csvfilename);
     if(!file.is_open()){
-        std::cerr << "Cannot open file " << outputDir + "/particle-simu-omp.csv" << std::endl;
+        std::cerr << "Cannot open file " << csvfilename << std::endl;
         return;
     }
 
-- 
GitLab