Linux - nohup - standalone

16 views (last 30 days)
Francois Anquez
Francois Anquez on 8 May 2012
I have two questions : I use a compiled program from my .m code. I'm under linux (ubuntu) and I am using MAtlab 11b and MCR v716.
_
Here are my questions : 1) Even if I did set the environment variable correctly (I think), I still need to specify the directory of the MCR when starting the compiled program ( ./run_myprogram.sh MCRlocation/ 'params'). Is it normal ? Do you have an idea where it could come from ?
_
2) I want to run program through the network on a distant machine. For this, with my normal program in C or fortran, I was used to connect via ssh and then use 'nohup'( command : nohup ./myprogram.out). It turns out it does not work with matlab compiled files while it is OK with my C/fortram program. I guess this might be due to the dynamic compilation, even if I am not sure. Do you have any idea ? I did try to rewire the standard io of the shell without success. Is there a scpecial link to rewire with MCR ?
I used : nohup runscript.sh ~/MCRlocation/ 'in_params1' 'in_params2' >screen.out 2> sortie.err </dev/null &. I also tried several variants with no wiring of io and a program without input parameters. No effect, nohup does not work.
The effect is always the same. I run the script with nohup -> OK. I logout using exit -> display logout but does not come back to my distant shell. close the windows -> process stopped (see it with top command)... any idea ? It is quite annoying situation.
If I ask the run_script to verboe (-xv) it tells me 'segmentation fault' when I exit...
_
Thank you by advance for your help,
best regards,
Francois.

Accepted Answer

Daniel Shub
Daniel Shub on 9 May 2012

More Answers (1)

Francois Anquez
Francois Anquez on 20 May 2012
Hi, Thanks a lot. screen works fine !
I still do not undertand why nohup does not work but if screen does the job...
best, Francois.

Categories

Find more on Help and Support in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!