Browse Source

Even if CUDA is installed on the machine, there may be no GPU available.

Cédric Augonnet 15 years ago
parent
commit
c2393291f1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/core/topology.c

+ 1 - 0
src/core/topology.c

@@ -175,6 +175,7 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
 	else
 	{
 		/* by default, we take a round robin policy */
+		if (nhwgpus > 0)
 		for (i = 0; i < STARPU_NMAXWORKERS; i++)
 			workers_gpuid[i] = (unsigned)(i % nhwgpus);