Browse Source

Useless checks and lines deleted.

As _starpu_get_cuda_device_count() cannot return a value greater
than MAXCUDADEVS we don't need to check and display the warning
message one more time.
Nicolas Collin 13 years ago
parent
commit
c1ff1fec58
2 changed files with 4 additions and 15 deletions
  1. 0 15
      src/core/topology.c
  2. 4 0
      src/drivers/cuda/driver_cuda.c

+ 0 - 15
src/core/topology.c

@@ -298,13 +298,6 @@ static int _starpu_init_machine_config(struct _starpu_machine_config *config)
 		{
 			/* Nothing was specified, so let's choose ! */
 			ncuda = nb_devices;
-			if (ncuda > STARPU_MAXCUDADEVS)
-			{
-				fprintf(stderr,
-					"# Warning: %d CUDA devices available. Only %d enabled. Use configure option --enable-maxcudadev=xxx to update the maximum value of supported CUDA devices.\n",
-					nb_devices, STARPU_MAXCUDADEVS);
-				ncuda = STARPU_MAXCUDADEVS;
-			}
 		}
 		else
 		{
@@ -316,14 +309,6 @@ static int _starpu_init_machine_config(struct _starpu_machine_config *config)
 					ncuda, nb_devices);
 				ncuda = nb_devices;
 			}
-			/* Let's make sure this value is OK. */
-			if (ncuda > STARPU_MAXCUDADEVS)
-			{
-				fprintf(stderr,
-					"# Warning: %d CUDA devices requested. Only %d enabled. Use configure option --enable-maxcudadev=xxx to update the maximum value of supported CUDA devices.\n",
-					ncuda, STARPU_MAXCUDADEVS);
-				ncuda = STARPU_MAXCUDADEVS;
-			}
 		}
 	}
 

+ 4 - 0
src/drivers/cuda/driver_cuda.c

@@ -163,6 +163,10 @@ static void deinit_context(int workerid, int devid)
 		STARPU_CUDA_REPORT_ERROR(cures);
 }
 
+
+/* Return the number of devices usable in the system.
+ * The value returned cannot be greater than MAXCUDADEVS */
+
 unsigned _starpu_get_cuda_device_count(void)
 {
 	int cnt;