client: Update commits 5c1fa20 & 5e984c0: when Mac is booted, it can take over 120 seconds before system extension CUDA.kext is loaded (fix occasional failure to recognize CUDA devices when BOINC is launched automatically at login before CUDA has initialized at system boot.)

This commit is contained in:
Charlie Fenton 2016-01-20 04:23:57 -08:00
parent 124b272564
commit 31446d1cb9
1 changed files with 2 additions and 2 deletions

View File

@ -345,12 +345,12 @@ void* cudalib = NULL;
#ifdef __APPLE__
// If system is just booting, CUDA driver may not be ready yet
for (int retryCount=0; retryCount<45; retryCount++) {
for (int retryCount=0; retryCount<120; retryCount++) {
#endif
retval = (*__cuInit)(0);
#ifdef __APPLE__
if (!retval) break;
if (TickCount() > (120*60)) break; // Don't retry if system has been up for over 2 minutes
if (TickCount() > (300*60)) break; // Don't retry if system has been up for over 5 minutes
boinc_sleep(1.);
continue;
}