Rasto
Rasto

Reputation: 17774

Running Matlab tasks on remote machine

I am working on machine learning task in Matlab (using Neural networks toolbox of Matlab). Thus I need to run computations that are very demanding in terms of RAM and processor time. My computer is not sufficient for that task but I have an access to Linux server that is powerful enough.

I am looking for the way how to run computational tasks from Matlab GUI that is running on my own computer on that server. Ideally it should work given these condition:

How can I do that? If you need more information about the settings or if you know other solutions please leave a comment. I'll be happy to respond.

Upvotes: 3

Views: 5501

Answers (3)

silverK
silverK

Reputation: 1

You can run MATLAB jobs on remote Linux server from your local PC without the MDCS setup however for large scale and multiple users the MCDS is highly recommended. You can use plink to automated the putty command line execution from MATLAB.

We are executing our Simulink model simulations with multiple iterations on a more capable remote Linux server. You will require the following:

1) MATLAB installation on both client and server machine with parallel computing toolbox

2) Mapped Linux server shared network drive (for data I/O)

3) Plink for automated Putty

4) Command line script for silent MATLAB execution on the remote machine

MATLAB code example:

plinkFile = which('plink.exe');

command = [plinkFile ' -ssh ' [ServerUrl] ' -l ' [Username] ...
                    ' -pw ' [Password] ' matlab -nodesktop -nosplash ' ...
                    '-r "' [RemoteScriptName] ...
                    '\(\''' InputDataSharedDriveFilePath] '\''\);" &'];  

[status,cmdout] = system(command);  

Upvotes: 0

Edric
Edric

Reputation: 25140

As hinted at in the comments, Parallel Computing Toolbox + MATLAB Distributed Computing Server could address this, and if you're actively updating the code, it may be simpler than the mcc approach. However, you do have to install the MDCS piece on the server and get things set up. If you're not using any MEX files, the difference in architecture should be irrelevant. If you are using MEX files, you need to ensure that you can compile them for the server architecture and make them available there.

Upvotes: 3

Oli
Oli

Reputation: 16045

If you do not have matlab on the server, the only way is to:

  • modify the code such that it outputs a file

  • compile your code using mcc (toolbox required)

  • send it to your server (do you have a shared disk?, otherwise use pscp http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html )

  • execute it (using putty from command line)

  • get back the output file (same than sending)

We are all doing that in my lab (except that we are on ubuntu)

Upvotes: 3

Related Questions