User:Jgt/sandbox matlab: Difference between revisions
From HPC Wiki
< User:Jgt
(Created page with "test") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Preliminaries= | |||
{{Cmd | |||
|module keyword matlab | |||
|output= | |||
<pre> | |||
matlab/r2018a : plot math graphics matlab | |||
octave/4.2.1 : plot matlab octave | |||
</pre> | |||
}} | |||
{{Cmd|module load matlab}} | |||
{{Cmd|module load matlab/r2018a}} | |||
{{Cmd | |||
|module list | |||
|output= | |||
<pre> | |||
Currently Loaded Modulefiles: | |||
1) matlab/r2018a | |||
</pre> | |||
}} | |||
=Interactive Session - No GUI= | |||
{{Cmd | |||
|srun -p float -n 2 --pty -t 03:00:00 bash | |||
|module load matlab | |||
|matlab -nodesktop -nodisplay -nosplash | |||
|output= | |||
<pre> | |||
< M A T L A B (R) > | |||
Copyright 1984-2018 The MathWorks, Inc. | |||
R2018a (9.4.0.813654) 64-bit (glnxa64) | |||
February 23, 2018 | |||
To get started, type one of these: helpwin, helpdesk, or demo. | |||
For product information, visit www.mathworks.com. | |||
>> disp('Hello, World!') | |||
Hello, World! | |||
>> helloWorld | |||
Hello, World! | |||
</pre> | |||
}} | |||
=Interactive Session - GUI= | |||
To use the MATLAB graphical user interface (GUI) remotely, you will need to enable X11 forwarding over SSH by adding -X (Note: X is capitalized) to the ssh command when logging into Magnolia. | |||
{{Cmd|ssh user@magnolia.usm.edu -X}} | |||
Once on Magnolia, start an interactive bash session by running the srun command below. This will create an interactive session on the float partition that uses two processors with a time limit of three hours. The --x11 flag has been added to enable X11 forwarding. | |||
{{Cmd|srun -p float -n 2 --pty --x11 -t 03:00:00 bash}} | |||
Then make sure that you are not on one of the head nodes (magnolia01/magnolia02) and load the matlab module into the environment. Once this is complete, simply type matlab into the prompt and the GUI should appear on your desktop. | |||
{{Cmd | |||
|module load matlab | |||
|matlab | |||
|output= | |||
<pre> | |||
MATLAB is selecting SOFTWARE OPENGL rendering. | |||
</pre> | |||
}} | |||
=Non-Interactive Batch Job= |
Latest revision as of 09:44, 19 September 2018
Preliminaries
user $
module keyword matlab
matlab/r2018a : plot math graphics matlab octave/4.2.1 : plot matlab octave
user $
module load matlab
user $
module load matlab/r2018a
user $
module list
Currently Loaded Modulefiles: 1) matlab/r2018a
Interactive Session - No GUI
user $
srun -p float -n 2 --pty -t 03:00:00 bash
user $
module load matlab
user $
matlab -nodesktop -nodisplay -nosplash
< M A T L A B (R) > Copyright 1984-2018 The MathWorks, Inc. R2018a (9.4.0.813654) 64-bit (glnxa64) February 23, 2018 To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. >> disp('Hello, World!') Hello, World! >> helloWorld Hello, World!
Interactive Session - GUI
To use the MATLAB graphical user interface (GUI) remotely, you will need to enable X11 forwarding over SSH by adding -X (Note: X is capitalized) to the ssh command when logging into Magnolia.
user $
ssh user@magnolia.usm.edu -X
Once on Magnolia, start an interactive bash session by running the srun command below. This will create an interactive session on the float partition that uses two processors with a time limit of three hours. The --x11 flag has been added to enable X11 forwarding.
user $
srun -p float -n 2 --pty --x11 -t 03:00:00 bash
Then make sure that you are not on one of the head nodes (magnolia01/magnolia02) and load the matlab module into the environment. Once this is complete, simply type matlab into the prompt and the GUI should appear on your desktop.
user $
module load matlab
user $
matlab
MATLAB is selecting SOFTWARE OPENGL rendering.