Clear Filters
Clear Filters

Matlab folder was not seen in the slave node.

2 views (last 30 days)
Hi Matlab community, I installed Matlab at the /usr/local/ in the master node (My linux machine consisted to one master node and two slave nodes), and the Matlab was well worked. But in the slave node by login using ssh command, the Matlab folder was not seen at the /usr/local/ location, so I could not run the Matlab... Can I get some help?

Answers (1)

Sanchari
Sanchari on 27 Apr 2024
Hello Si Hoon,
It sounds like you're dealing with a distributed computing environment where MATLAB is installed on a master node, but you're having trouble accessing it from slave nodes. Here are several steps and considerations to help you run MATLAB from the slave nodes:
1. Network File System (NFS): Ensure that the /usr/local/ directory (where MATLAB is installed on the master node) is shared across the nodes using a Network File System (NFS). This would allow all nodes to access the MATLAB installation directory as if it were local to them.
  1. Setting up NFS: You would typically set up an NFS share on the master node and mount it on the slave nodes. This involves editing /etc/exports on the master node to share the directory and using the mount command on the slave nodes to mount the shared directory.
2. Environment Variables: MATLAB relies on certain environment variables being set, such as PATH to include the MATLAB binary directory. After mounting the MATLAB directory from the master node on the slave nodes, ensure these environment variables are correctly set on the slave nodes.You can add the MATLAB binary directory to the PATH environment variable in the slave nodes' user profile scripts (e.g., ~/.bashrc or ~/.bash_profile):export PATH=/usr/local/MATLAB/R20XXx/bin:$PATHReplace R20XXx with your MATLAB version.
3. License Considerations: Ensure that your MATLAB license permits running MATLAB on multiple nodes. Network licenses are typically set up to allow this, but you'll need to ensure that the slave nodes can access the license server. This might involve configuring the “network.lic” file on the slave nodes to point to the license server used by the MATLAB installation.
4. Direct Execution from Slave Nodes: Once the NFS share is mounted, and environment variables are set, you should be able to run MATLAB directly from the slave nodes through the command line or scripts. For example:matlab -nodesktop -nosplash -r "your_script"
5. Testing and Troubleshooting:
  1. Testing NFS: Ensure that the NFS share is correctly mounted on the slave nodes by navigating to the mount point and listing the contents.
  2. Permissions: Verify that the user on the slave nodes has sufficient permissions to access and execute MATLAB in the shared directory.
  3. Network Issues: Ensure there are no network issues preventing the slave nodes from accessing the master node or the license server.
6. Parallel Computing Toolbox and MATLAB Distributed Computing Server: For high-level distributed computing tasks, consider using MATLAB's Parallel Computing Toolbox and MATLAB Distributed Computing Server. These tools are designed to manage and simplify distributed computing tasks, including running computations on clusters.
Here are some further resources you can refer to:
  1. Parallel Computing Toolbox (MathWorks Documentation): https://www.mathworks.com/help/parallel-computing/index.html?searchHighlight=Parallel%20Computing%20Toolbox&s_tid=srchtitle_support_results_1_Parallel%20Computing%20Toolbox
  2. Parallel Matlab Interface (PMI – File Exchange): https://www.mathworks.com/matlabcentral/fileexchange/219-pmi?s_tid=srchtitle_support_results_10_Matlab%20in%20slave
  3. Install Products (MathWorks Documentation): https://www.mathworks.com/help/install/install-products.html?searchHighlight=Matlab%20linux%20install&s_tid=srchtitle_support_results_1_Matlab%20linux%20install
  4. “Libunwind” installation required for Linux (Bug Reports): https://www.mathworks.com/support/bugreports/2936508
  5. Error when connecting to target board (ML Answer): https://www.mathworks.com/support/search.html/answers/1628360-why-am-i-unable-to-connect-to-target-the-model-throws-an-error-external-mode-open-protocol-connec.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:ecoder/deployment&page=1
  6. Parallel Coding for Linux (RED HAT) (ML Answer): https://www.mathworks.com/support/search.html/answers/48826-parallel-coding-does-not-work-in-linux-red-hat.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:matlab-parallel-server/cluster-configuration&page=1
Hope this helps!

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!