matlab
Introduction
Usage
module load matlab/2024a OR module load matlab/2022b OR many older version like: module load matlab/2018b Other versions available: matlab/2019b matlab/2021a To get a full listing of all versions available on the cluster, please type: module avail matlabÂ
Matlab 2021a
Usage
module load matlab/2021a module list Currently Loaded Modulefiles: 1) matlab/2011a Matlab will be loaded in the PATH.
Install Directory
/sw/Matlab/2021a
Sample PBS script
cat power_plot.m
%>>>>>>>>>>>>>>>>>>> % % John Burkardt % addpath('/export/home/sNUMBER/MatlabFileDir') fprintf ( 1, '\n' ); fprintf ( 1, 'POWER_PLOT\n' ); fprintf ( 1, ' Plot some data, store it in a PNG file.\n' ); n = 200; x = 1 : n; y = 2 * rand ( 1, n ) - 1; y = sign ( y ) .* y.^2; y = cumsum ( y, 2 ); plot ( x, y ); xlabel ( 'X', 'FontName', 'Helvetica', 'FontWeight', 'bold', ... 'FontSize', 16 ); ylabel ( 'Y', 'FontName', 'Helvetica', 'FontWeight', 'bold', ... 'FontSize', 16, 'Rotation', 0 ); title ( 'Power\_Plot', 'FontName', 'Helvetica', 'FontWeight', ... 'bold', 'FontSize', 16 ); print -dpng 'power_plot.png'; fprintf ( 1, '\n' ); fprintf ( 1, ' The data was stored in "power_plot.png".\n' ); exit %#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cat pbs.00
#PBS -m abe #PBS -M emailID@griffith.edu.au #PBS -N Power_Plot #PBS -l select=1:ncpus=2:mem=7g #PBS -l walltime=6:00:00 source $HOME/.bashrc cd $PBS_O_WORKDIR ###module load matlab/2009b (if using matlab 2009b) module load matlab/2011a echo "Starting job" matlab -nodisplay -nodesktop -nosplash < /export/home/<sNumber>/pbs/matlab/power_plot.m echo "Done with job"
Submit the job as follows:
qsub pbs.00
Matlab 2009b
Usage
module load matlab/2009b module list Currently Loaded Modulefiles: 1) matlab/2009b Matlab will be loaded in the PATH.
Install Directory
/sw/Matlab/2009b
Sample PBS script
See http://confluence.rcs.griffith.edu.au:8080/display/GHPC/matlab#matlab-SamplePBSscript
Matlab 2017a Installation Notes
License number: 2150 Installation folder: /sw/Matlab/R2017a Download Size: 6,885 MB Installation Size: 18,252 MB Products: MATLAB 9.2 (download) Simulink 8.9 (download) Bioinformatics Toolbox 4.8 (download) Communications System Toolbox 6.4 (download) Computer Vision System Toolbox 7.3 (download) Control System Toolbox 10.2 (download) Curve Fitting Toolbox 3.5.5 (download) DSP System Toolbox 9.4 (download) Embedded Coder 6.12 (download) Financial Toolbox 5.9 (download) Fuzzy Logic Toolbox 2.2.25 (download) Global Optimization Toolbox 3.4.2 (download) Image Acquisition Toolbox 5.2 (download) Image Processing Toolbox 10.0 (download) Mapping Toolbox 4.5 (download) MATLAB Coder 3.3 (download) MATLAB Compiler 6.4 (download) MATLAB Compiler SDK 6.3.1 (download) Model Predictive Control Toolbox 5.2.2 (download) Neural Network Toolbox 10.0 (download) Optimization Toolbox 7.6 (download) Parallel Computing Toolbox 6.10 (download) Partial Differential Equation Toolbox 2.4 (download) Robust Control Toolbox 6.3 (download) Signal Processing Toolbox 7.4 (download) SimBiology 5.6 (download) Simscape 4.2 (download) Simscape Driveline 2.12 (download) Simscape Electronics 2.11 (download) Simscape Multibody 5.0 (download) Simscape Power Systems 6.7 (download) Your installation may require additional configuration steps. 1. The following products require a supported compiler: Simulink Coder 8.12 MATLAB Coder 3.3 2. Simulink requires a C compiler for simulation acceleration, model reference, and MATLAB Function Block capabilities. It is recommended that you install a supported compiler on your machine. 3. To accelerate computations with the following products, a supported compiler is required: SimBiology 5.6 4. MATLAB Compiler SDK 6.3.1 requires the following: ? a supported compiler for creation of C and C++ Shared libraries  ? a Java JDK for creation of Java packages
switch between the two versions
module switch matlab/2011a matlab/2009b module list Currently Loaded Modulefiles: 1) matlab/2009b
Matlab for Griffith researchers
Matlab is available through the software request system.
https://intranet.secure.griffith.edu.au/computing/software log into software requests and type matlab in the search software.
https://www102.griffith.edu.au/products.aspx?type=search&input=matlab
How may I add all subfolders in my matlab path?
Create a file called "startup.m" with contents similar to the example below
addpath(genpath('/export/home/s12345/scratch/GIBBON-3.5.0'))
Please have a look at:Â https://au.mathworks.com/help/matlab/ref/filesep.html
Create a path to the iofun folder on a Linux® platform. iofun_dir = ['toolbox' filesep 'matlab' filesep 'iofun'] iofun_dir = 'toolbox/matlab/iofun'
Another pbs script Usage Example
Open matlab (module load matlab/2021a;matlab) and do the following to add path:
addpath('/export/home/s2986149/sw/matlab/R2021a/toolbox')
addpath('/export/home/s2986149/sw/matlab/R2021a/toolbox/GIBBONS')
addpath('/export/home/s2986149/sw/matlab/R2021a/toolbox/GIBBONS/lib')
addpath('/export/home/s2986149/sw/matlab/R2021a/toolbox/GIBBONS/lib_ext')
addpath(genpath('/export/home/s2986149/sw/matlab/R2021a/toolbox'))
savepath /export/home/s2986149/sw/matlab/R2021a/toolbox/pathdef.m
From shell prompt, I do this:
cp  /export/home/s123456/sw/matlab/R2021a/toolbox/pathdef.m  /export/home/s123456/
Create a pbs script as follows:
#!/bin/bash #PBS -m abe #PBS -M email@griffith.edu.au #PBS -N FEBio3_visco_ecoflex10 #PBS -q workq #PBS -l select=1:ncpus=6:mem=10gb,walltime=300:00:00 echo 'This script is running on:' hostname echo 'The data is:' date echo $PBS_O_WORKDIR module load misc/febio/3.6 #module load misc/baronsolver/20.4.14 module load anaconda3/2021.11 module load matlab/2021a source activate myenv pwd module list cd /export/home/s123456/FEA_scripts/Mat_Visco_Ecoflex10 pwd # The command(s) to be executed: cp ~/pathdef.m . matlab -nodisplay -nosplash -nodesktop -r "run('/export/home/s2986149/FEA_scripts/Mat_Visco_Ecoflex10/C_inverse_FEA_uniaxial_viscoelastic.m');exit;" echo 'Done'