MATLAB: Difference between revisions
(Created page with "MATLAB is a programming environment for algorithm development, data analysis, visualization, and numerical computation. Using MATLAB, you can solve technical computing problems faster than traditional programming languages, such as C, C++, and Fortran. You can use MATLAB in various applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. A common mistake for ne...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
You can use MATLAB in various applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. | You can use MATLAB in various applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. | ||
A common mistake for new users of HPC clusters is to run heavy workloads directly on a login node | ==== Running MATLAB in interactive mode ==== | ||
A common mistake for new users of HPC clusters is to run heavy workloads directly on a login node. Please make sure to run your program as a job interactively on a compute node. Processes left running on login nodes may be terminated without warning. For more information on jobs, see our Running Jobs user guide. | |||
To run MATLAB interactively on a compute node, follow these two steps: | To run MATLAB interactively on a compute node, follow these two steps: | ||
Reserve job resources on a node using salloc | # Reserve job resources on a node using salloc | ||
Once resources are allocated, load the required modules and enter matlab -nodisplay | # Once resources are allocated, load the required modules and enter matlab -nodisplay | ||
<syntaxhighlight lang="css"> | |||
salloc --time=1:00:00 --ntasks=1 --cpus-per-task=8 --mem=16G --account=<nu/hpcnc> | |||
salloc: Pending job allocation 24316 | |||
salloc: job 24316 queued and waiting for resources | |||
salloc: job 24316 has been allocated resources | |||
salloc: Granted job allocation 24316 | |||
salloc: Waiting for resource configuration | |||
salloc: Nodes cn08 are ready for job | |||
</syntaxhighlight>Make sure to change the resource requests (the <code>--time=1:00:00 --ntasks=1 --cpus-per-task=8 --mem=16G --account=<nu/hpcnc></code>part after your <code>salloc</code>command) as needed to reflect the number of cores and memory required. | |||
Once you are granted the resources and logged in to a compute node, load the module and then enter <code>matlab -nodisplay</code>: |
Latest revision as of 04:37, 3 July 2024
MATLAB is a programming environment for algorithm development, data analysis, visualization, and numerical computation. Using MATLAB, you can solve technical computing problems faster than traditional programming languages, such as C, C++, and Fortran.
You can use MATLAB in various applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology.
Running MATLAB in interactive mode
A common mistake for new users of HPC clusters is to run heavy workloads directly on a login node. Please make sure to run your program as a job interactively on a compute node. Processes left running on login nodes may be terminated without warning. For more information on jobs, see our Running Jobs user guide.
To run MATLAB interactively on a compute node, follow these two steps:
- Reserve job resources on a node using salloc
- Once resources are allocated, load the required modules and enter matlab -nodisplay
salloc --time=1:00:00 --ntasks=1 --cpus-per-task=8 --mem=16G --account=<nu/hpcnc>
salloc: Pending job allocation 24316
salloc: job 24316 queued and waiting for resources
salloc: job 24316 has been allocated resources
salloc: Granted job allocation 24316
salloc: Waiting for resource configuration
salloc: Nodes cn08 are ready for job
Make sure to change the resource requests (the --time=1:00:00 --ntasks=1 --cpus-per-task=8 --mem=16G --account=<nu/hpcnc>
part after your salloc
command) as needed to reflect the number of cores and memory required.
Once you are granted the resources and logged in to a compute node, load the module and then enter matlab -nodisplay
: