CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Nohup nice n 19 (http://www.cfd-online.com/Forums/openfoam-solving/59008-nohup-nice-n-19-a.html)

ztdep March 26, 2008 03:39

Dear friends: i can not un
 
Dear friends:
i can not understand what is the meaning of "nohup nice -n 19 " when i run the case, woudl sombody give me some information
regards

olesen March 26, 2008 05:02

* man nohup * man nice both
 
* man nohup
* man nice
both give fairly good information.
As an alternative, you can also try
* info nohup
* info nice

fugu March 26, 2008 05:46

1) When you run something from
 
1) When you run something from a shell without any specific option it will run as a foreground task. The shell will be locked until the process ends.
To prevent this you can issue the command as
myCommand &
this way the process will be forked from the shell
leaving the shell free.
2) Using the ampersand & the process will still be attached to the shell meaning that it will die when the shell dies. This is particularly relevant when running long jobs on remote machines: you want to keep the process running even when you are logged out. The nohup puts the process in background i.e. it won't die with the shell.
The nice command with an appropriate option change s the priority of a job leaving leaving more or less horsepower to other processes running on the machine.
FYI http://www.code.ucsd.edu/local/HelpDocs/NohupHelp.html

Regards
Luca

heavy_user April 29, 2010 09:48

Hey There,

the nohup command works fine for me running a single application e.g.

nohup solvername

But trying to use it in parallel was not successful so far.

If I use the command:

nohup mpirun -np 2 solvername -parallel

or
nohup mpirun -np 2 solvername -parallel >log

the job dies once i close the terminal/log off.

So how do I have to modify the command to make it work in parallel?

regards!

markto April 12, 2011 02:28

Quote:

Originally Posted by heavy_user (Post 256856)
Hey There,

the nohup command works fine for me running a single application e.g.

nohup solvername

But trying to use it in parallel was not successful so far.

If I use the command:

nohup mpirun -np 2 solvername -parallel

or
nohup mpirun -np 2 solvername -parallel >log

the job dies once i close the terminal/log off.

So how do I have to modify the command to make it work in parallel?

regards!

Hallo,

I have the same problem right now, i can not keep the job alive when I'm running in parallel with nohup.

Did you solve this problem?

Thanks a lot,
Mark

heavy_user April 18, 2011 04:55

Quote:

Originally Posted by markto (Post 303209)
Hallo,

I have the same problem right now, i can not keep the job alive when I'm running in parallel with nohup.

Did you solve this problem?

Thanks a lot,
Mark

Hi Mark,

fill a script with the commands to run openfoam.
You can execute the script with nohup.

best.

Knigge46 July 16, 2014 06:06

Also works, if you pause the process with "CTRL+Z" and then disown it by just typing

disown -h

This gives the process(es) over to the shell and they won't be closed if you close your terminal window.
Then simply send it to background by doing

bg %1

(where %1 stands for your process which you paused recently) and you can close the terminal while the processes keep running! :)


All times are GMT -4. The time now is 01:57.