Skip to content

Commit

Permalink
Merge pull request #64 from Danzelot/matlab
Browse files Browse the repository at this point in the history
Adds Matlab usage section
  • Loading branch information
bast committed Sep 16, 2019
2 parents 9dd968b + bc7535a commit 8810eed
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions software/python_r_perl.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _python_r_perl:

*******************
Python, R and Perl
Python, R, Matlab and Perl
*******************
Scripting languages often support modules or libraries for additional functionality or convenience functions. We encourage users to install modules locally for only the current user.

Expand Down Expand Up @@ -179,7 +179,7 @@ Now you can use R from the command line just as you would on your local computer
Install Packages
-----------------
To install R packages use ``install.packages()``.
First open the R command line and then install apackage e.g. "tidyverse"::
First open the R command line and then install a package e.g. "tidyverse"::
R
install.packages("tidyverse")
Expand All @@ -190,6 +190,46 @@ Confirm both questions with ``y`` and then choose a close download mirror



MATLAB
========
Load MATLAB
------------
To use MATLAB simply load the module at the start of your jobscript or type them on
the command line::

ml purge
ml avail matlab # To display all installed versions
ml MATLAB/R2018a-foss-2017a # or any other version you want

Interactice Shell
------------------
On the login nodes you can start a normal MATLAB session with an graphical user interface (GUI). You can use this to visualize and look at data. Just type ``matlab``.

But remember NOT to run calculations on the login nodes as this might slow down the system for all stallo users. If this happens we will kill the process without prior warning.

You can also start an interactive matlab shell on the command line without graphical user interface (headless) with::

matlab -nodesktop -nodisplay -nosplash

See ``matlab -h`` for all command line options.
If you are on a compute node ``matlab`` always starts a headless matlab shell.

Running MATLAB Scripts
-----------------------
You can run a matlab script by::

matlab -r -nodisplay -nosplash -r 'run("SCRIPT.m")'

In some instances it might be necessary to use an absolute file path to the script.

Tips
-----
* You can reduce the memory usage by starting matlab without java support, just add ``-nojvm``.
* To get a graphical interface when starting ``matlab`` on a login node, you need to activate X11 forwarding for your ssh connection to stallo.
If you connect to stallo from a linux machine use ``ssh -X`` to tunnel graphical output to your computer.



Perl
======

Expand Down

0 comments on commit 8810eed

Please sign in to comment.