Run SSH (remote simulation) from Octave in Linux
Moderator: thorsten
-
- Posts: 11
- Joined: Tue 05 May 2015, 15:28
Run SSH (remote simulation) from Octave in Linux
Hello, Thorsten!
I tried to run remotely openEMS calculation from a client machine working under Linux Mint. Of course it needs specific set-ups in comparison with Windows. When I run openEMS via SSH connection from Matlab there is no problem. But when I do the same in Octave - Octave hangs on the line 'RunOpenEMS(Sim_Path,Sim_CSX, '', Settings);'. Do you have any idea which parameters I must write in 'Settings' structure to launch connection correctly?
I tried to run remotely openEMS calculation from a client machine working under Linux Mint. Of course it needs specific set-ups in comparison with Windows. When I run openEMS via SSH connection from Matlab there is no problem. But when I do the same in Octave - Octave hangs on the line 'RunOpenEMS(Sim_Path,Sim_CSX, '', Settings);'. Do you have any idea which parameters I must write in 'Settings' structure to launch connection correctly?
Re: Run SSH (remote simulation) from Octave in Linux
Hi,
I would not expect different settings for Octave vs. Matlab. But I confess that I only ever tried remote simulation using Matlab.
I will have a look.
What is your sever running on? Linux too? What are your current settings??
regards
Thorsten
I would not expect different settings for Octave vs. Matlab. But I confess that I only ever tried remote simulation using Matlab.
I will have a look.
What is your sever running on? Linux too? What are your current settings??
regards
Thorsten
Re: Run SSH (remote simulation) from Octave in Linux
Hi,
I just did a run. It worked, but Octave does not print the ssh output. Thus you think it hangs, while it is actually running on the host.
I have to find a way to make Octave show the output...
regards
Thorsten
I just did a run. It worked, but Octave does not print the ssh output. Thus you think it hangs, while it is actually running on the host.
I have to find a way to make Octave show the output...
regards
Thorsten
Re: Run SSH (remote simulation) from Octave in Linux
Hi again,
replace line 151 in RunOpenEMS.m:
with:
That is replace "unix" with "system". That makes Octave plot the system call output immediately.
BTW, I have configured Octave (using .octaverc) with:
Maybe if you do not have this, it will still page the output, making it look like hanging...
I will need to check if this is ok for Matlab too and make a commit.. Thanks for the feedback.
regards
Thorsten
replace line 151 in RunOpenEMS.m:
Code: Select all
status = unix([ssh_command ' ' ssh_options ' ' Settings.SSH.host ' "cd ' ssh_work_path ' && ' Settings.SSH.bin ' ' Sim_File ' ' opts '"' append_unix]);
Code: Select all
status = system([ssh_command ' ' ssh_options ' ' Settings.SSH.host ' "cd ' ssh_work_path ' && ' Settings.SSH.bin ' ' Sim_File ' ' opts '"' append_unix]);
BTW, I have configured Octave (using .octaverc) with:
Code: Select all
disp('disable recursive rmdir confirmation')
confirm_recursive_rmdir(0);
disp('set page screen output to 0 and immediate output to 1')
page_screen_output(0);
page_output_immediately(1);
I will need to check if this is ok for Matlab too and make a commit.. Thanks for the feedback.
regards
Thorsten
-
- Posts: 11
- Joined: Tue 05 May 2015, 15:28
Re: Run SSH (remote simulation) from Octave in Linux
Hi, Thorsten!
Thank you so much for such a quick answer. Because you already solved the problem of shh output in Octave, I think it is not necessary to write my settings here right now. I will do it later when I also test Octave with set-ups you gave. By the way, I use Linux Mint 17.2 as a client and Linux Ubuntu 14.04 LTS. And thank you again, Thorsten, you helped a lot!
Thank you so much for such a quick answer. Because you already solved the problem of shh output in Octave, I think it is not necessary to write my settings here right now. I will do it later when I also test Octave with set-ups you gave. By the way, I use Linux Mint 17.2 as a client and Linux Ubuntu 14.04 LTS. And thank you again, Thorsten, you helped a lot!
-
- Posts: 11
- Joined: Tue 05 May 2015, 15:28
Re: Run SSH (remote simulation) from Octave in Linux
Hi again, Thorsten!
So, I changed 'unix' by 'system' in line 151 of RunOpenEMS.m and now it works. I testet it in Matlab and Octave, there is no problem. According to your advice I added initialization commands into .octaverc and now Octave even manages to show the name of a temporary directory on a remote server.
As I guess a public key for SSH in Linux Mint is so to say 'globaly' known for ssh-service therefore I specify only in my matlab file the following parameters:
That's all.
So, I changed 'unix' by 'system' in line 151 of RunOpenEMS.m and now it works. I testet it in Matlab and Octave, there is no problem. According to your advice I added initialization commands into .octaverc and now Octave even manages to show the name of a temporary directory on a remote server.
As I guess a public key for SSH in Linux Mint is so to say 'globaly' known for ssh-service therefore I specify only in my matlab file the following parameters:
Code: Select all
Settings.SSH.host = 'alexeylebedev@141.60.191.101'; % lab PC
Settings.SSH.bin = '/opt/openEMS/bin/openEMS.sh';
Re: Run SSH (remote simulation) from Octave in Linux
Hi,
yes there would have been no need for further informations as the problem has been found.
And yes, the ssh password less login is independent of Octave or Matlab. You can no always login to your lab PC without a password. Please be aware that if someone gets access to your PC (and private keys) they have access to your lab-PC as well...
regards
Thorsten
yes there would have been no need for further informations as the problem has been found.
And yes, the ssh password less login is independent of Octave or Matlab. You can no always login to your lab PC without a password. Please be aware that if someone gets access to your PC (and private keys) they have access to your lab-PC as well...
regards
Thorsten