Преглед на файлове

find_and_assign_combination(): properly check the return value of starpu_combined_worker_assign_workerid().

Cyril Roelandt преди 12 години
родител
ревизия
e3f48575e7
променени са 1 файла, в които са добавени 1 реда и са изтрити 4 реда
  1. 1 4
      src/sched_policies/detect_combined_workers.c

+ 1 - 4
src/sched_policies/detect_combined_workers.c

@@ -100,9 +100,6 @@ static void find_and_assign_combinations(hwloc_obj_t obj, unsigned synthesize_ar
     unsigned i, n, nworkers;
     int cpu_workers[STARPU_NMAXWORKERS];
 
-    int ret;
-
-
 	struct _starpu_machine_config *config = _starpu_get_machine_config();
 	struct starpu_machine_topology *topology = &config->topology;
 
@@ -134,8 +131,8 @@ static void find_and_assign_combinations(hwloc_obj_t obj, unsigned synthesize_ar
 			struct worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
 			int newworkerid = starpu_combined_worker_assign_workerid(nworkers, cpu_workers);
+			STARPU_ASSERT(newworkerid >= 0);
 			workers->add(workers,newworkerid);
-			STARPU_ASSERT(ret >= 0);
     }
 	
     /* Add artificial intermediate objects recursively */