I am trying to run an application on multiple processors using openMPI. The command is as follows:

$mpirun -np 2 <executable>

For all those unfamiliar with the mpirun-command: -np specifies the number of processors to be used.
From time to time I log in using a remote machine and ssh. I can start my mpi-process normally. The downside is that I have to keep my remote terminal open and my remote machine running until the process is finished. I'd like to be able to log off and shut down the remote machine though.

I tried using the nohup-command as follows:

$nohup mpirun -np 2 <executable> > run.out &

Which starts the process just fine (and writes the output to <run.out>). Once I close the terminal thought, the process is killed despite the 'nohup' command.

I also tried

$nohup bash -c "mpirun -np 2 <executable> > run.out" &


$nohup ksh -c "mpirun -np 2 <executable> > run.out" &

Unfortunately without success.
Can anyone help with this?