The job I need to submit requires MATLAB. How do I get MATLAB to run?
For Matlab I would suggest loading the cluster’s Matlab environment module in your sbatch script with, for example: module load matlab/matlab2019a
Do this before calling Matlab in the script. This configures your shell PATH so it can find Matlab. Several versions of Python are also available in Spack, if you need them.
You can also use Switcher to set your Matlab environment in a more permanent way with:
switcher matlab = matlab2019a
Then logout of the cluster, and back in again. Matlab will always be in your PATH. This negates the requirement for adding it to your scripts.
For more information, see:
https://www.uvm.edu/vacc/kb/knowledge-base/load-software-packages/
https://www.uvm.edu/vacc/kb/knowledge-base/useful-commands/