You are not logged in.

#1 2010-11-08 22:32:33

fredre
Member
Registered: 2009-12-18
Posts: 45

[SOLVED] Is there a way to save a stopped process to disk?

Say I have a job running in a terminal, and I stop it with ^z. I know I can use fg to resume it, but is there a way I can save it as a file?

My issue is that I have to run some extensive Monte Carlo simulations, and my only computer is a laptop. I'm looking for a way to pause the process and save it, so I can shutdown, use my computer for other things, etc. Then I want to resume the process at some later time. Any suggestions on how to do this?

Last edited by fredre (2010-11-09 01:36:33)

Offline

#2 2010-11-08 22:46:01

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED] Is there a way to save a stopped process to disk?

While I don't have an answer to your question, if the laptop has a multicore processor you could use taskset(1) to limit the simulation to a subset of the cores.

Edit: For the shutdown part, you could use hibernation.

Last edited by foutrelis (2010-11-08 22:49:38)

Offline

#3 2010-11-09 01:36:20

fredre
Member
Registered: 2009-12-18
Posts: 45

Re: [SOLVED] Is there a way to save a stopped process to disk?

After doing some research, I've found a couple programs which can do this: CryoPID and DMTCP. Neither are in the AUR, and I was unable to successfully compile cryopid2, so I haven't tried it out. I was able to compile dmtcp and in the few tests I've done with it, it has worked flawlessly.

I'm marking this thread as solved, but if anyone has any comments or suggestions feel free to add them.

Offline

#4 2010-11-09 16:41:03

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED] Is there a way to save a stopped process to disk?

fredre wrote:

My issue is that I have to run some extensive Monte Carlo simulations, and my only computer is a laptop. I'm looking for a way to pause the process and save it, so I can shutdown, use my computer for other things, etc. Then I want to resume the process at some later time. Any suggestions on how to do this?

MC on a laptop??? Sounds masohistic...

Anyways, it was good to learn about this topic. Have you seen this https://upc-bugs.lbl.gov//blcr/doc/html … Guide.html ?

Last edited by Leonid.I (2010-11-09 16:42:13)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#5 2010-11-10 01:11:40

fredre
Member
Registered: 2009-12-18
Posts: 45

Re: [SOLVED] Is there a way to save a stopped process to disk?

Leonid.I wrote:

MC on a laptop??? Sounds masohistic...

Anyways, it was good to learn about this topic. Have you seen this https://upc-bugs.lbl.gov//blcr/doc/html … Guide.html ?

Thanks for the suggestion, it looks like exactly what I need.

I'm curious though if you've got it running, as I can't seem to get it built. I've opened a thread about it here.

Offline

Board footer

Powered by FluxBB