Hi!
Whenever I forget to shut down BOINC before the PC is switched to hibernation (to disk or RAM) under Linux, the CUDA app will crash the next time the host is awakened. I guess the OS hibernation code and/or NVIDIA driver is just not smart enough to restore the GPU context to exactly what it was before.
Is this at all feasible? Is there any BOINC project out there that has a CUDA app that can survive hibernation? Is there a way so that BOINC could suspend the app itself before hibernation is finished?
CU
HB
Copyright © 2025 Einstein@Home. All rights reserved.
CUDA & hibernation
)
As far as I know, not one.
The preference "Suspend work if no mouse/keyboard activity in last --- minutes" was made for that. It's there to allow BOINC to suspend normally before your computer goes to low-power mode (what hibernation is). Set it to an amount of minutes that's lower than the amount of minutes your OS waits before going to hibernation, so BOINC still has time to suspend everything normally.
(Not sure what happens when Leave applications in memory is on though)
I'm pretty sure hibernation
)
I'm pretty sure hibernation shuts down your computer entirely by copying the full contents of your RAM into a hibernation file. Stand-by mode is low power mode, at least in Windows - but maybe there's no consensus about this between OSes? Not that it makes your post any less valid.
RE: by copying the full
)
Well, if that's so, that would account for it. I don't think the OS copies what's in the RAM of the videocard and puts that into the hibernation file.
The preference I pointed to will at least take everything out of memory (As long as LAIM is off) before hibernation starts. That includes what's in the GPU RAM.
I'll ask the developers, though. :)
RE: I'll ask the
)
Ok, chatted with Rom.
Here's what: BOINC already listens for the power state of the OS. Before going into hibernation, it will already suspend all work. Suspending will unload applications from memory, but for if Leave apps in memory is on.
But there's the catch. They only do this listening of changes in the power state for Windows. Not for Linux or any other OS. If you want that added, you best email the BOINC Alpha list with a request for that. That's what Rom is asking as well. The list does need registration.
Further point of
)
Further point of clarification:
Leave Applications In Memory is an old switch, previous to all this GPU shenanigans. It's only significant for CPU applications using main system RAM (and the OS-managed swapfile, of course).
GPU applications are always removed from GPU RAM whenever suspended - except for the minor exception, much pestered-for by yours truly, that there's no need to unload a GPU app purely while a CPU benchmark is running.
That's assuming you're running a late-enough version - the currently-recommended (at least it still was the last time I looked) v6.10.56 is late enough. Prior to that, there were all sorts of douible-stuffed GPU RAM problem reports in the buglist.