- Map a drive to (or mount) the remote system. Pros: Relatively easy to do, keeps your data on remote system. Cons: Can be extremely slow, as everything has to be done over the wire. Also, when the VPN connection drops, you can end up with corrupt data (save is half-done), encounter errors (file not found), etc.
- Use some sort of remote display technology (Remote Desktop, VNC, nc, screen, ssh, etc). Pros: All data resides at remote site, so you don't have to deal with replication. You also run MATLAB at the remote site. If connection drops, you don't lose anything -- you just reconnect. You can also leave something and come back to it when you get back to work. Cons: Requires VPN connection to work, so no "off network" stuff works. Consumes MATLAB license at work. Graphics updates can be pokey.
- Set up a syncing method (example: Dropbox). Pros: Sync software automatically syncs files in a directory structure between any arbitrary set of devices. Works without VPN active. Not necessarily dependent on active network connection. Cons: May be against security policies of your organization. Synchronization is not instant. Also, there are limits on how much data you can move before you have to pay up.
How to point to folders/files on a remote server in MATLAB?
22 views (last 30 days)
Show older comments
Hi,
My work folders and files are on a remote server that I connect to using VPN. After launching the connection, I can access and work with my files in a Unix shell window. My Matlab however is installed locally on my computer. How can I point to my files on the remote server in Matlab? In other words how can I make Matlab see the files outside of my desktop? I want to be able to use Matlab script just like my Unix shell window.
Thank you.
0 Comments
Accepted Answer
Jason Ross
on 3 Apr 2012
For most purposes, MATLAB doesn't really implement anything that does such things -- it relies upon whatever the system presents to it to work on files. So it seems that this is "how do I work with remote files and a local MATLAB question. There are a few ways to do this, and there won't be a "right" answer because a lot of it will depend on what resources you have available, your speed requirements, security requirements and (assuming you work for one) organizational policies.
I have found in my personal experience that scenario 1 works well in situations where I have a small amount of data to move (e.g. editing a document or small script). I favor this setup less and less since the remote display technologies for #2 are nearly as good as running locally -- especially Remote Desktop.
Scenario 2 works well when I am doing something that relies upon having access to tools and utilities on our network that I don't have at home. I find myself using this most often nowadays because with the VPN connection I just hook up to my work computer from anywhere, disconnect and then when I reconnect I pick up immediately when I left off.
Scenario 3 is very commonly used by my wife, who needs to sync documents between our home desktop and her laptop. Since she's self-employed and I'm the head of IT at home, this is an approved IT policy :).
There may also be support for some sort of syncing that your organization provides, or you could try to "roll your own", using something like xcopy, rsync or another tool that will sync from one location to another -- there are many ways to do this, but it does add some complexity to the setup.
Now, for the exception: If you want to submit a job to a remote cluster for execution to happen, there are ways to set that up -- but I don't think that's what you are looking for here, otherwise you would have asked the question differently.
3 Comments
Jason Ross
on 3 Apr 2012
There are example scripts in (matlabroot)/toolbox/distcomp/examples/integration that detail how to set up a generic scheduler integration. There are examples for PBS/Torque, LSF and SGE. I would suspect that you would be most interested in the "nonshared" or "remoteSubmission" examples.
After the integration is set up and validated, you can write a script that sets up the job and submits it to the cluster.
Jason Ross
on 3 Apr 2012
The overall documentation (including examples) for how to use the generic scheduler is here:
http://www.mathworks.com/help/toolbox/distcomp/bqur7ev-35.html
Note that there was a new API for 2012a, so if you are using an earlier version make sure to look up the documentation for that release as some of the names have changed, although the concepts are still the same.
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!