Browse Source

fix warnings detected by cppcheck

Nathalie Furmento 8 years ago
parent
commit
cf5f930104

+ 14 - 14
src/core/perfmodel/perfmodel_bus.c

@@ -747,7 +747,7 @@ static void benchmark_all_gpu_devices(void)
 #endif /* STARPU_USE_MIC */
 
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-    
+
         _starpu_mpi_common_measure_bandwidth_latency(mpi_time_device_to_device, mpi_latency_device_to_device);
 
 #endif /* STARPU_USE_MPI_MASTER_SLAVE */
@@ -1206,7 +1206,7 @@ static void write_bus_latency_file_content(void)
 #endif
                                 /* TODO Latency MIC */
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-                                /* Modify MPI src and MPI dst if they contain the master node or not 
+                                /* Modify MPI src and MPI dst if they contain the master node or not
                                  * Because, we only take care about slaves */
                                 int mpi_master = _starpu_mpi_common_get_src_node();
 
@@ -1225,7 +1225,7 @@ static void write_bus_latency_file_content(void)
                                         }
                                         else
                                         {
-                                                /* Only src represents an MPI device 
+                                                /* Only src represents an MPI device
                                                  * So we add latency between src and master */
                                                 latency += mpi_latency_device_to_device[mpi_src][mpi_master];
                                         }
@@ -1234,7 +1234,7 @@ static void write_bus_latency_file_content(void)
                                 {
                                         if (dst > ncuda + nopencl + nmic && dst <= ncuda + nopencl + nmic + nmpi_ms)
                                         {
-                                                /* Only dst identifies an MPI device 
+                                                /* Only dst identifies an MPI device
                                                  * So we add latency between master and dst */
                                                 latency += mpi_latency_device_to_device[mpi_master][mpi_dst];
                                         }
@@ -1476,7 +1476,7 @@ static void write_bus_bandwidth_file_content(void)
 					slowness += mic_time_host_to_device[dst - (ncuda + nopencl)];
 #endif
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-                                /* Modify MPI src and MPI dst if they contain the master node or not 
+                                /* Modify MPI src and MPI dst if they contain the master node or not
                                  * Because, we only take care about slaves */
                                 int mpi_master = _starpu_mpi_common_get_src_node();
 
@@ -1496,7 +1496,7 @@ static void write_bus_bandwidth_file_content(void)
                                         }
                                         else
                                         {
-                                                /* Only src represents an MPI device 
+                                                /* Only src represents an MPI device
                                                  * So we add bandwidth between src and master */
                                                 slowness += 1.0/mpi_time_device_to_device[mpi_src][mpi_master];
                                         }
@@ -1505,7 +1505,7 @@ static void write_bus_bandwidth_file_content(void)
                                 {
                                         if (dst > ncuda + nopencl + nmic && dst <= ncuda + nopencl + nmic + nmpi_ms)
                                         {
-                                                /* Only dst identifies an MPI device 
+                                                /* Only dst identifies an MPI device
                                                  * So we add bandwidth between master and dst */
                                                 slowness += 1.0/mpi_time_device_to_device[mpi_master][mpi_dst];
                                         }
@@ -1573,7 +1573,7 @@ void starpu_bus_print_bandwidth(FILE *f)
 	for (dst = 0; dst < nmic; dst++)
 		fprintf(f, "MIC%u\t", dst);
 	for (dst = 0; dst < nmpi_ms; dst++)
-		fprintf(f, "MPI_MS%d\t", dst);
+		fprintf(f, "MPI_MS%u\t", dst);
 	fprintf(f, "\n");
 
 	for (src = 0; src <= maxnode; src++)
@@ -1587,7 +1587,7 @@ void starpu_bus_print_bandwidth(FILE *f)
 		else if (src <= ncuda + nopencl + nmic)
 			fprintf(f, "MIC%u\t", src-ncuda-nopencl-1);
                 else
-			fprintf(f, "MPI_MS%d\t", src-ncuda-nopencl-nmic-1);
+			fprintf(f, "MPI_MS%u\t", src-ncuda-nopencl-nmic-1);
 		for (dst = 0; dst <= maxnode; dst++)
 			fprintf(f, "%.0f\t", bandwidth_matrix[src][dst]);
 
@@ -1606,7 +1606,7 @@ void starpu_bus_print_bandwidth(FILE *f)
 		else if (src <= ncuda + nopencl + nmic)
 			fprintf(f, "MIC%u\t", src-ncuda-nopencl-1);
                 else
-			fprintf(f, "MPI_MS%d\t", src-ncuda-nopencl-nmic-1);
+			fprintf(f, "MPI_MS%u\t", src-ncuda-nopencl-nmic-1);
 		for (dst = 0; dst <= maxnode; dst++)
 			fprintf(f, "%.0f\t", latency_matrix[src][dst]);
 
@@ -1662,7 +1662,7 @@ static void generate_bus_bandwidth_file(void)
 {
 	if (!was_benchmarked)
 		benchmark_all_gpu_devices();
-    
+
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
         /* Slaves don't write files */
         if (!_starpu_mpi_common_is_src_node())
@@ -1859,7 +1859,7 @@ static void write_bus_config_file_content(void)
         fprintf(f, "%u # Number of CUDA devices\n", ncuda);
         fprintf(f, "%u # Number of OpenCL devices\n", nopencl);
         fprintf(f, "%u # Number of MIC devices\n", nmic);
-        fprintf(f, "%d # Number of MPI devices\n", nmpi_ms);
+        fprintf(f, "%u # Number of MPI devices\n", nmpi_ms);
 
 	if (locked)
 		_starpu_fwrunlock(f);
@@ -1870,7 +1870,7 @@ static void generate_bus_config_file(void)
 {
 	if (!was_benchmarked)
 		benchmark_all_gpu_devices();
-    
+
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
         /* Slaves don't write files */
         if (!_starpu_mpi_common_is_src_node())
@@ -2760,7 +2760,7 @@ void _starpu_save_bandwidth_and_latency_disk(double bandwidth_write, double band
 					slowness_main_ram_between_node = 1/bandwidth_matrix[STARPU_MAIN_RAM][j];
 				else
 					slowness_main_ram_between_node = 0;
-				
+
 				bandwidth_matrix[i][j] = 1/(slowness_disk_between_main_ram+slowness_main_ram_between_node);
 			}
 			else if (j == node) /* destination == disk */

+ 80 - 81
src/core/topology.c

@@ -613,7 +613,7 @@ _starpu_init_topology (struct _starpu_machine_config *config)
 #ifdef STARPU_USE_SCC
 	config->topology.nhwscc = _starpu_scc_src_get_device_count();
 #endif
-#ifdef STARPU_USE_MPI_MASTER_SLAVE 
+#ifdef STARPU_USE_MPI_MASTER_SLAVE
         config->topology.nhwmpi = _starpu_mpi_src_get_device_count();
 #endif
 
@@ -903,7 +903,7 @@ _starpu_init_mic_config (struct _starpu_machine_config *config,
 	}
 
 	topology->nworkers += topology->nmiccores[mic_idx];
-}  
+}
 
 static COIENGINE mic_handles[STARPU_MAXMICDEVS];
 COIPROCESS _starpu_mic_process[STARPU_MAXMICDEVS];
@@ -966,7 +966,7 @@ _starpu_init_mpi_config (struct _starpu_machine_config *config,
         }
 
         topology->nworkers += topology->nmpicores[mpi_idx];
-}  
+}
 #endif
 
 static void
@@ -980,90 +980,89 @@ _starpu_init_mp_config (struct _starpu_machine_config *config,
 	 * - configure the workers accordingly.
 	 */
 
-	struct _starpu_machine_topology *topology = &config->topology;
-
 #ifdef STARPU_USE_MIC
-    if (!no_mp_config)
-    {
-        /* Discover and initialize the number of MIC nodes through the mp
-         * infrastructure. */
-        unsigned nhwmicdevices = _starpu_mic_src_get_device_count();
-
-        int reqmicdevices = starpu_get_env_number("STARPU_NMIC");
-        if (reqmicdevices == -1 && user_conf)
-            reqmicdevices = user_conf->nmic;
-        if (reqmicdevices == -1)
-            /* Nothing was specified, so let's use the number of
-             * detected mic devices. ! */
-            reqmicdevices = nhwmicdevices;
-
-	if (reqmicdevices != -1)
+	if (!no_mp_config)
 	{
-		if ((unsigned) reqmicdevices > nhwmicdevices)
-		{
-			/* The user requires more MIC devices than there is available */
-			_STARPU_MSG("# Warning: %d MIC devices requested. Only %d available.\n", reqmicdevices, nhwmicdevices);
+		struct _starpu_machine_topology *topology = &config->topology;
+
+		/* Discover and initialize the number of MIC nodes through the mp
+		 * infrastructure. */
+		unsigned nhwmicdevices = _starpu_mic_src_get_device_count();
+
+		int reqmicdevices = starpu_get_env_number("STARPU_NMIC");
+		if (reqmicdevices == -1 && user_conf)
+			reqmicdevices = user_conf->nmic;
+		if (reqmicdevices == -1)
+			/* Nothing was specified, so let's use the number of
+			 * detected mic devices. ! */
 			reqmicdevices = nhwmicdevices;
-		}
-	}
 
-        topology->nmicdevices = 0;
-        unsigned i;
-        for (i = 0; i < (unsigned) reqmicdevices; i++)
-                if (0 == _starpu_init_mic_node (config, i, &mic_handles[i], &_starpu_mic_process[i]))
-                        topology->nmicdevices++;
+		if (reqmicdevices != -1)
+		{
+			if ((unsigned) reqmicdevices > nhwmicdevices)
+			{
+				/* The user requires more MIC devices than there is available */
+				_STARPU_MSG("# Warning: %d MIC devices requested. Only %d available.\n", reqmicdevices, nhwmicdevices);
+				reqmicdevices = nhwmicdevices;
+			}
+		}
 
+		topology->nmicdevices = 0;
+		unsigned i;
+		for (i = 0; i < (unsigned) reqmicdevices; i++)
+			if (0 == _starpu_init_mic_node (config, i, &mic_handles[i], &_starpu_mic_process[i]))
+				topology->nmicdevices++;
 
-        for (i = 0; i < topology->nmicdevices; i++)
-                _starpu_init_mic_config (config, user_conf, i);
-    }
+		for (i = 0; i < topology->nmicdevices; i++)
+			_starpu_init_mic_config (config, user_conf, i);
+	}
 #endif
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-    {
-            /* Discover and initialize the number of MPI nodes through the mp
-             * infrastructure. */
-            unsigned nhwmpidevices = _starpu_mpi_src_get_device_count();
-
-            int reqmpidevices = starpu_get_env_number("STARPU_NMPI_MS");
-            if (reqmpidevices == -1 && user_conf)
-                    reqmpidevices = user_conf->nmpi_ms;
-            if (reqmpidevices == -1)
-                    /* Nothing was specified, so let's use the number of
-                     * detected mpi devices. ! */
-                    reqmpidevices = nhwmpidevices;
-
-            if (reqmpidevices != -1)
-            {
-                    if ((unsigned) reqmpidevices > nhwmpidevices)
-                    {
-                            /* The user requires more MPI devices than there is available */
-                            fprintf(stderr,
-                                            "# Warning: %d MPI Master-Slave devices requested. Only %d available.\n",
-                                            reqmpidevices, nhwmpidevices);
-                            reqmpidevices = nhwmpidevices;
-                    }
-            }
-
-            topology->nmpidevices = reqmpidevices;
-
-            /* if user don't want to use MPI slaves, we close the slave processes */
-            if (no_mp_config && topology->nmpidevices == 0)
-            {
-                    _starpu_mpi_common_mp_deinit();
-                    exit(0);
-            }
-
-            if (!no_mp_config)
-            {
-                    unsigned i;
-                    for (i = 0; i < topology->nmpidevices; i++)
-                            mpi_ms_nodes[i] = _starpu_mp_common_node_create(STARPU_NODE_MPI_SOURCE, i);
-
-
-                    for (i = 0; i < topology->nmpidevices; i++)
-                            _starpu_init_mpi_config (config, user_conf, i);
-            }
-    }
+	{
+		struct _starpu_machine_topology *topology = &config->topology;
+
+		/* Discover and initialize the number of MPI nodes through the mp
+		 * infrastructure. */
+		unsigned nhwmpidevices = _starpu_mpi_src_get_device_count();
+
+		int reqmpidevices = starpu_get_env_number("STARPU_NMPI_MS");
+		if (reqmpidevices == -1 && user_conf)
+			reqmpidevices = user_conf->nmpi_ms;
+		if (reqmpidevices == -1)
+			/* Nothing was specified, so let's use the number of
+			 * detected mpi devices. ! */
+			reqmpidevices = nhwmpidevices;
+
+		if (reqmpidevices != -1)
+		{
+			if ((unsigned) reqmpidevices > nhwmpidevices)
+			{
+				/* The user requires more MPI devices than there is available */
+				_STARPU_MSG("# Warning: %d MPI Master-Slave devices requested. Only %d available.\n",
+					    reqmpidevices, nhwmpidevices);
+				reqmpidevices = nhwmpidevices;
+			}
+		}
+
+		topology->nmpidevices = reqmpidevices;
+
+		/* if user don't want to use MPI slaves, we close the slave processes */
+		if (no_mp_config && topology->nmpidevices == 0)
+		{
+			_starpu_mpi_common_mp_deinit();
+			exit(0);
+		}
+
+		if (!no_mp_config)
+		{
+			unsigned i;
+			for (i = 0; i < topology->nmpidevices; i++)
+				mpi_ms_nodes[i] = _starpu_mp_common_node_create(STARPU_NODE_MPI_SOURCE, i);
+
+			for (i = 0; i < topology->nmpidevices; i++)
+				_starpu_init_mpi_config (config, user_conf, i);
+		}
+	}
 #endif
 }
 
@@ -1082,7 +1081,7 @@ _starpu_deinit_mic_node (unsigned mic_idx)
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
 static void _starpu_deinit_mpi_node(int devid)
 {
-        _starpu_mp_common_send_command(mpi_ms_nodes[devid], STARPU_MP_COMMAND_EXIT, NULL, 0);                          
+        _starpu_mp_common_send_command(mpi_ms_nodes[devid], STARPU_MP_COMMAND_EXIT, NULL, 0);
 
         _starpu_mp_common_node_destroy(mpi_ms_nodes[devid]);
 }
@@ -2014,7 +2013,7 @@ _starpu_init_workers_binding (struct _starpu_machine_config *config, int no_mp_c
                                         }
                                 }
 #endif
-                
+
 				workerarg->bindid = mpi_bindid[devid];
 				_starpu_memory_node_add_nworkers(memory_node);
 #ifdef STARPU_SIMGRID

+ 6 - 6
src/debug/traces/starpu_fxt_mpi.c

@@ -227,12 +227,12 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, unsigned n)
 	for (node = 0; node < n ; node++)
 	{
 #ifdef STARPU_HAVE_POTI
-		snprintf(mpi_container, sizeof(mpi_container), "%d_mpict", node);
+		snprintf(mpi_container, sizeof(mpi_container), "%u_mpict", node);
 		poti_SetVariable(0., mpi_container, "bwi", 0.);
 		poti_SetVariable(0., mpi_container, "bwo", 0.);
 #else
-		fprintf(out_paje_file, "13	%.9f	%d_mpict	bwi	%f\n", 0., node, 0.);
-		fprintf(out_paje_file, "13	%.9f	%d_mpict	bwo	%f\n", 0., node, 0.);
+		fprintf(out_paje_file, "13	%.9f	%u_mpict	bwi	%f\n", 0., node, 0.);
+		fprintf(out_paje_file, "13	%.9f	%u_mpict	bwo	%f\n", 0., node, 0.);
 #endif
 	}
 
@@ -321,15 +321,15 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, unsigned n)
 			char paje_value[STARPU_POTI_STR_LEN], paje_key[STARPU_POTI_STR_LEN];
 			snprintf(paje_value, STARPU_POTI_STR_LEN, "%lu", (long unsigned) size);
 			snprintf(paje_key, STARPU_POTI_STR_LEN, "mpicom_%lu", id);
-			snprintf(mpi_container, sizeof(mpi_container), "%d_mpict", src);
+			snprintf(mpi_container, sizeof(mpi_container), "%u_mpict", src);
 			poti_StartLink(start_date, "MPICt", "MPIL", mpi_container, paje_value, paje_key);
 			poti_SetVariable(start_date, mpi_container, "bwo", current_out_bandwidth[src]);
 			snprintf(mpi_container, sizeof(mpi_container), "%d_mpict", dst);
 			poti_EndLink(end_date, "MPICt", "MPIL", mpi_container, paje_value, paje_key);
 			poti_SetVariable(start_date, mpi_container, "bwo", current_in_bandwidth[dst]);
 #else
-			fprintf(out_paje_file, "18	%.9f	MPIL	MPIroot	%lu	%d_mpict	mpicom_%lu\n", start_date, (unsigned long)size, src, id);
-			fprintf(out_paje_file, "19	%.9f	MPIL	MPIroot	%lu	%d_mpict	mpicom_%lu\n", end_date, (unsigned long)size, dst, id);
+			fprintf(out_paje_file, "18	%.9f	MPIL	MPIroot	%lu	%u_mpict	mpicom_%lu\n", start_date, (unsigned long)size, src, id);
+			fprintf(out_paje_file, "19	%.9f	MPIL	MPIroot	%lu	%u_mpict	mpicom_%lu\n", end_date, (unsigned long)size, dst, id);
 			fprintf(out_paje_file, "13	%.9f	%d_mpict	bwo	%f\n", start_date, src, current_out_bandwidth[src]);
 			fprintf(out_paje_file, "13	%.9f	%d_mpict	bwi	%f\n", start_date, dst, current_in_bandwidth[dst]);
 #endif

+ 7 - 9
src/drivers/mp_common/source_common.c

@@ -203,6 +203,7 @@ int _starpu_src_common_store_message(struct _starpu_mp_node *node,
 	{
 		case STARPU_MP_COMMAND_EXECUTION_COMPLETED:
 		case STARPU_MP_COMMAND_PRE_EXECUTION:
+		{
 			message = mp_message_new();
 			message->type = answer;
 			_STARPU_MALLOC(message->buffer, arg_size);
@@ -213,27 +214,24 @@ int _starpu_src_common_store_message(struct _starpu_mp_node *node,
 			mp_message_list_push_front(&node->message_queue,message);
 			STARPU_PTHREAD_MUTEX_UNLOCK(&node->message_queue_mutex);
 			return 1;
-			break;
-                        /* For ASYNC commands don't store them, update event */
+		}
+		/* For ASYNC commands don't store them, update event */
                 case STARPU_MP_COMMAND_RECV_FROM_HOST_ASYNC_COMPLETED:
                 case STARPU_MP_COMMAND_RECV_FROM_SINK_ASYNC_COMPLETED:
-                        {
+		{
                                 struct _starpu_async_channel * event = *((struct _starpu_async_channel **) arg);
                                 event->starpu_mp_common_finished_receiver--;
                                 return 1;
-                                break;
-                        }
+		}
                 case STARPU_MP_COMMAND_SEND_TO_HOST_ASYNC_COMPLETED:
                 case STARPU_MP_COMMAND_SEND_TO_SINK_ASYNC_COMPLETED:
-                        {
+		{
                                 struct _starpu_async_channel * event = *((struct _starpu_async_channel **) arg);
                                 event->starpu_mp_common_finished_sender--;
                                 return 1;
-                                break;
-                        }
+		}
                 default:
                         return 0;
-			break;
 	}
 }
 

+ 9 - 9
src/drivers/mpi/driver_mpi_source.c

@@ -87,16 +87,16 @@ int _starpu_mpi_copy_ram_to_mpi_sync(void *src, unsigned src_node STARPU_ATTRIBU
 {
         struct _starpu_mp_node *mp_node = _starpu_mpi_src_get_mp_node_from_memory_node(dst_node);
         return _starpu_src_common_copy_host_to_sink_sync(mp_node, src, dst, size);
-}   
- 
+}
+
 /* Transfert SIZE bytes from the address pointed by SRC in the SRC_NODE memory
  * node to the address pointed by DST in the DST_NODE memory node
- */    
+ */
 int _starpu_mpi_copy_mpi_to_ram_sync(void *src, unsigned src_node, void *dst, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t size)
 {
         struct _starpu_mp_node *mp_node = _starpu_mpi_src_get_mp_node_from_memory_node(src_node);
         return _starpu_src_common_copy_sink_to_host_sync(mp_node, src, dst, size);
-}   
+}
 
 int _starpu_mpi_copy_sink_to_sink_sync(void *src, unsigned src_node, void *dst, unsigned dst_node, size_t size)
 {
@@ -273,10 +273,10 @@ void *_starpu_mpi_src_worker(void *arg)
 
                 _starpu_driver_start(baseworker, _STARPU_FUT_MPI_KEY, 0);
 
-#ifdef STARPU_USE_FXT             
+#ifdef STARPU_USE_FXT
                 for (i = 1; i < worker_set->nworkers; i++)
                         _starpu_worker_start(&worker_set->workers[i], _STARPU_FUT_MPI_KEY, 0);
-#endif          
+#endif
 
                 // Current task for a thread managing a worker set has no sense.
                 _starpu_set_current_task(NULL);
@@ -284,8 +284,8 @@ void *_starpu_mpi_src_worker(void *arg)
                 for (i = 0; i < config->topology.nmpicores[devid]; i++)
                 {
                         struct _starpu_worker *worker = &config->workers[baseworkerid+i];
-                        snprintf(worker->name, sizeof(worker->name), "MPI_MS %d core %u", devid, i);
-                        snprintf(worker->short_name, sizeof(worker->short_name), "MPI_MS %d.%u", devid, i);
+                        snprintf(worker->name, sizeof(worker->name), "MPI_MS %u core %u", devid, i);
+                        snprintf(worker->short_name, sizeof(worker->short_name), "MPI_MS %u.%u", devid, i);
                 }
 
 #ifndef STARPU_MPI_MASTER_SLAVE_MULTIPLE_THREAD
@@ -297,7 +297,7 @@ void *_starpu_mpi_src_worker(void *arg)
 #else
                 {
                         char thread_name[16];
-                        snprintf(thread_name, sizeof(thread_name), "MPI_MS %d", devid);
+                        snprintf(thread_name, sizeof(thread_name), "MPI_MS %u", devid);
                         starpu_pthread_setname(thread_name);
                 }
 #endif

+ 12 - 12
src/drivers/opencl/driver_opencl.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2016  Université de Bordeaux
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -957,14 +957,14 @@ static int _starpu_opencl_start_job(struct _starpu_job *j, struct _starpu_worker
 			/* Actually execute function */
 			simulate = 0;
 			func(_STARPU_TASK_GET_INTERFACES(task), task->cl_arg);
-		#ifdef STARPU_OPENCL_SIMULATOR
-		    #ifndef CL_PROFILING_CLOCK_CYCLE_COUNT
-		      #ifdef CL_PROFILING_COMMAND_SHAVE_CYCLE_COUNT
-			#define CL_PROFILING_CLOCK_CYCLE_COUNT CL_PROFILING_COMMAND_SHAVE_CYCLE_COUNT
-		      #else
-			#error The OpenCL simulator must provide CL_PROFILING_CLOCK_CYCLE_COUNT
-		      #endif
-		    #endif
+#ifdef STARPU_OPENCL_SIMULATOR
+#ifndef CL_PROFILING_CLOCK_CYCLE_COUNT
+#ifdef CL_PROFILING_COMMAND_SHAVE_CYCLE_COUNT
+#define CL_PROFILING_CLOCK_CYCLE_COUNT CL_PROFILING_COMMAND_SHAVE_CYCLE_COUNT
+#else
+#error The OpenCL simulator must provide CL_PROFILING_CLOCK_CYCLE_COUNT
+#endif
+#endif
 			struct starpu_profiling_task_info *profiling_info = task->profiling_info;
 			STARPU_ASSERT_MSG(profiling_info->used_cycles, "Application kernel must call starpu_opencl_collect_stats to collect simulated time");
 #ifdef HAVE_MSG_HOST_GET_SPEED
@@ -978,9 +978,9 @@ static int _starpu_opencl_start_job(struct _starpu_job *j, struct _starpu_worker
 		}
 		if (simulate)
 			_starpu_simgrid_submit_job(worker->workerid, j, &worker->perf_arch, length,
-				async ? &task_finished[worker->devid][pipeline_idx] : NULL,
-				async ? &task_mutex[worker->devid][pipeline_idx] : NULL,
-				async ? &task_cond[worker->devid][pipeline_idx] : NULL);
+						   async ? &task_finished[worker->devid][pipeline_idx] : NULL,
+						   async ? &task_mutex[worker->devid][pipeline_idx] : NULL,
+						   async ? &task_cond[worker->devid][pipeline_idx] : NULL);
 #else
 		func(_STARPU_TASK_GET_INTERFACES(task), task->cl_arg);
 #endif

+ 2 - 2
tools/cppcheck/suppressions.txt

@@ -29,7 +29,7 @@ redundantAssignment:tests/main/driver_api/init_run_deinit.c
 redundantAssignment:tests/main/driver_api/run_driver.c
 
 uselessAssignmentPtrArg:mpi/src/starpu_mpi.c:171
-unreadVariable:mpi/src/starpu_mpi.c:945
+unreadVariable:mpi/src/starpu_mpi.c:943
 redundantAssignment:src/core/workers.c
 
 invalidPointerCast:src/core/perfmodel/perfmodel_nan.c:74
@@ -53,7 +53,7 @@ unreadVariable:src/datawizard/interfaces/*
 unreadVariable:src/drivers/driver_common/driver_common.c:482
 clarifyCondition:src/drivers/opencl/driver_opencl.c:936
 unreadVariable:src/drivers/opencl/driver_opencl.c:767
-clarifyCondition:src/drivers/cuda/driver_cuda.c:506
+clarifyCondition:src/drivers/cuda/driver_cuda.c:507
 arithOperationsOnVoidPointer:src/drivers/scc/*
 nullPointerRedundantCheck:src/sched_policies/deque_modeling_policy_data_aware.c:196
 sizeofDereferencedVoidPointer:src/util/fstarpu.c