Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed Aug 17, 2023
1 parent aa9e067 commit 5c72304
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/prover_disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ class ContextQueue {
// throw std::runtime_error(err.str());
// }
// }
printf( "[ContextQueue] Timeout time: %d\n", (int)context_queue_timeout); fflush( stdout );
printf("[ContextQueue] Timeout time: %d\n", (int)context_queue_timeout);
fflush(stdout);
GreenReaperConfig cfg = {};
cfg.apiVersion = GR_API_VERSION;
cfg.threadCount = thread_count;
Expand All @@ -128,6 +129,12 @@ class ContextQueue {
}
cfg.gpuDeviceIndex = gpu_index;

std::cout << " [ContextQueue] Setting this->context_queue_timeout to: "
<< context_queue_timeout << std::endl
<< std::flush;

this->context_queue_timeout = context_queue_timeout;

for (uint32_t i = 0; i < context_count; i++) {

cfg.cpuOffset = i * thread_count;
Expand All @@ -151,6 +158,7 @@ class ContextQueue {
// Destroy contexts that were already created
while (!queue.empty()) {
grDestroyContext( queue.front() );
// does it matter that the timeout is active at this time?
queue.pop();
}
if (error_msg.length() < 1) {
Expand All @@ -169,15 +177,6 @@ class ContextQueue {
}
}
}
std::cout << " Setting this->context_queue_timeout to: " << context_queue_timeout
<< std::endl
<< std::flush;

this->context_queue_timeout = context_queue_timeout;

std::cout << " this->context_queue_timeout is now: " << this->context_queue_timeout
<< std::endl
<< std::flush;

return false;
}
Expand Down

0 comments on commit 5c72304

Please sign in to comment.