diff --git a/client/gpu_detect.cpp b/client/gpu_detect.cpp index 8139e9a78e..c5cb739dd0 100644 --- a/client/gpu_detect.cpp +++ b/client/gpu_detect.cpp @@ -437,6 +437,10 @@ int COPROCS::launch_child_process_to_detect_gpus() { int retval = 0; boinc_delete_file(COPROC_INFO_FILENAME); + for (i=0; i<300; ++i) { + if (!boinc_file_exists(COPROC_INFO_FILENAME)) break; + boinc_sleep(0.01); + } boinc_getcwd(dataDir); @@ -502,7 +506,10 @@ int COPROCS::launch_child_process_to_detect_gpus() { } for (i=0; i<300; ++i) { - if (!process_exists(prog)) break; + if (boinc_file_exists(COPROC_INFO_FILENAME) && + !process_exists(prog)) { + break; + } boinc_sleep(0.01); } diff --git a/client/main.cpp b/client/main.cpp index 2f641f0b6a..d3ffec120f 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -261,6 +261,17 @@ static void do_gpu_detection(int argc, char** argv) { boinc_install_signal_handlers(); gstate.parse_cmdline(argc, argv); + gstate.now = dtime(); + + int flags = + BOINC_DIAG_DUMPCALLSTACKENABLED | + BOINC_DIAG_HEAPCHECKENABLED | + BOINC_DIAG_TRACETOSTDOUT | + BOINC_DIAG_REDIRECTSTDERR | + BOINC_DIAG_REDIRECTSTDOUT; + + diagnostics_init(flags, "stdoutgpudetect", "stderrgpudetect"); + read_config_file(true); coprocs.detect_gpus(warnings);