From dc0c61097dc72cc727432fc4c548f2141e6a0070 Mon Sep 17 00:00:00 2001
From: Berenger Bramas <Berenger.Bramas@inria.fr>
Date: Fri, 28 Mar 2025 12:53:19 +0100
Subject: [PATCH] Update commute

---
 Benchmark/particles_starpu/particles-simu-starpu.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Benchmark/particles_starpu/particles-simu-starpu.cpp b/Benchmark/particles_starpu/particles-simu-starpu.cpp
index 9e179e5..d4b7c47 100644
--- a/Benchmark/particles_starpu/particles-simu-starpu.cpp
+++ b/Benchmark/particles_starpu/particles-simu-starpu.cpp
@@ -445,7 +445,7 @@ struct starpu_codelet cl_one_data = {
     .cuda_funcs = { p2p_inner_gpu_starpu },
 #endif
     .nbuffers = 1,
-    .modes = { STARPU_RW|STARPU_COMMUTE }, /* one buffer, read/write mode */
+    .modes = { starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE) }, /* one buffer, read/write mode */
     .name = "one_data_task"
 };
 
@@ -460,7 +460,7 @@ struct starpu_codelet cl_two_data = {
     .cuda_funcs = { p2p_neigh_gpu_starpu },
 #endif
     .nbuffers = 2,
-    .modes = { STARPU_RW|STARPU_COMMUTE, STARPU_RW|STARPU_COMMUTE }, /* two buffers, both read/write */
+    .modes = { starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE), starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE) }, /* two buffers, both read/write */
     .name = "two_data_task"
 };
 
@@ -565,7 +565,7 @@ auto BenchCore( const int NbLoops, const int MinPartsPerGroup, const int MaxPart
         for(int idxGroup1 = 0 ; idxGroup1 < int(particleGroups.size()) ; ++idxGroup1){
             auto& group1 = particleGroups[idxGroup1];
             const int priority = GetPriority<MaxNbDevices,FavorLocality>(false, maxInteractions, minInteractions, group1.getNbParticles()*group1.getNbParticles()).getPriority();
-            starpu_insert_task(&cl_one_data, STARPU_PRIORITY, priority, STARPU_RW|STARPU_COMMUTE, handles[idxGroup1], 0);
+            starpu_insert_task(&cl_one_data, STARPU_PRIORITY, priority, starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE), handles[idxGroup1], 0);
         }
 
         for(int idxGroup1 = 0 ; idxGroup1 < int(particleGroups.size()) ; ++idxGroup1){
@@ -576,7 +576,7 @@ auto BenchCore( const int NbLoops, const int MinPartsPerGroup, const int MaxPart
 
             const int priority = GetPriority<MaxNbDevices,FavorLocality>(false, maxInteractions, minInteractions, group1.getNbParticles()*group2.getNbParticles()).getPriority();
 
-            starpu_insert_task(&cl_two_data, STARPU_PRIORITY, priority, STARPU_RW|STARPU_COMMUTE, handles[idxGroup1], STARPU_RW|STARPU_COMMUTE, handles[idxGroup2], 0);
+            starpu_insert_task(&cl_two_data, STARPU_PRIORITY, priority, starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE), handles[idxGroup1], starpu_data_access_mode(STARPU_RW|STARPU_COMMUTE), handles[idxGroup2], 0);
         }
 
         // Wait for all tasks to be done
-- 
GitLab