CUDA & hibernation

Bikeman (Heinz-Bernd Eggenstein)
Bikeman (Heinz-...
Moderator
Joined: 28 Aug 06
Posts: 3522
Credit: 688759335
RAC: 203578
Topic 195183

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

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5779100
RAC: 0

CUDA & hibernation

Quote:
Is there any BOINC project out there that has a CUDA app that can survive hibernation?


As far as I know, not one.

Quote:
Is there a way so that BOINC could suspend the app itself before hibernation is finished?


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)

Ver Greeneyes
Ver Greeneyes
Joined: 26 Mar 09
Posts: 140
Credit: 9562235
RAC: 0

I'm pretty sure hibernation

Message 98533 in response to message 98532

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.

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5779100
RAC: 0

RE: by copying the full

Message 98534 in response to message 98533

Quote:
by copying the full contents of your RAM into a hibernation file.


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. :)

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5779100
RAC: 0

RE: I'll ask the

Message 98535 in response to message 98534

Quote:
I'll ask the developers, though. :)


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.

Richard Haselgrove
Richard Haselgrove
Joined: 10 Dec 05
Posts: 2140
Credit: 2769256015
RAC: 947286

Further point of

Message 98536 in response to message 98535

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.