Skip to main content

Matlab

MATLAB is a commercial mathematical software product developed by MathWorks.

MATLAB is used in data analysis, wireless communications, deep learning, image processing and computer vision, signal processing, quantitative finance and risk management, robotics, and control systems.

License required

Please purchase, download, and install the MATLAB license yourself. For assistance with installation or usage, contact us with proof of your research group's MATLAB license.


1. Script Template

submit.sh
#!/bin/bash
#SBATCH --nodes=1 # Number of nodes
#SBATCH --ntasks-per-node=56 # Number of cores per node
#SBATCH --ntasks=56 # Total number of cores
#SBATCH --partition=g1_share # Queue partition; must specify the correct partition
#SBATCH --job-name=hello # Job name
#SBATCH --output=hello.%j.out # Normal log output (%j parameter value is jobId)
#SBATCH --error=hello.%j.err # Error log output (%j parameter value is jobId)

##############################################
# Software Envrironment #
##############################################
unset I_MPI_PMI_LIBRARY # Unset default MPI library, use Intel's built-in
export I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=0 # Parameter modification required for Intel multi-node jobs
# module load intel/2022 intelmpi/2022 # Load Intel environment

##############################################
# Run job #
##############################################
# Single calculation file
# matlab -nodisplay < run.m

# Specify calculation directory
matlab -nodesktop -nosplash -nodisplay -r abc

2. The meanings of the command-line parameters are as follows:

  • -nodesktop: Do not display the desktop environment when starting MATLAB.
  • -nosplash: Do not display the splash screen when starting MATLAB.
  • -nodisplay: Do not display graphical windows when starting MATLAB.
  • -r: Run the specified MATLAB command.