Commit 237a5067c39588006bd42b07fcd35c841acd63e9

ckolivas 2011-06-23T15:28:12

Skip trying to start thread of GPUs that don't successfully initcl().

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cpu-miner.c b/cpu-miner.c
index 96f07bf..31e2aec 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -1251,6 +1251,10 @@ int main (int argc, char *argv[])
 
 		printf("Init GPU %i\n", i);
 		clStates[i] = initCl(i, name, sizeof(name));
+		if (!clStates[i]) {
+			applog(LOG_ERR, "Failed to init GPU %d", i);
+			continue;
+		}
 		printf("initCl() finished. Found %s\n", name);
 
 		if (unlikely(pthread_create(&thr->pth, NULL, gpuminer_thread, thr))) {