Warning: your browser isn't supported. Please install a modern one, like Firefox, Opera, Safari, Chrome or the latest Internet Explorer.
Thank you!

phone prefix: +49 351 463.....
# HPC Support

Operation Status
Ulf Markwardt: 33640

Claudia Schmidt: 39833 hpcsupport@zih.tu-dresden.de# Login and project application

Phone: 40000

Fax: 42328

servicedesk@tu-dresden.de

Claudia Schmidt: 39833 hpcsupport@zih.tu-dresden.de

Fax: 42328

servicedesk@tu-dresden.de

On this page:

The following applications are installed at ZIH:
Venus | Triton | Taurus | module | |
---|---|---|---|---|

Mathematica | x | mathematica | ||

Matlab | x | x | matlab | |

Octave | x | octave | ||

R | x | x | r |

`srun --pty ...`

Mathematica is a general computing environment, organizing many algorithmic, visualization, and user interface capabilities within a document-like user interface paradigm.

To remotely use the graphical frontend one has to add the Mathematica fonts to the local fontmanager.

For a Linux workstation:scp -r taurus.hrsk.tu-dresden.de:/sw/global/applications/mathematica/10.0/SystemFiles/Fonts/Type1/ ~/.fonts xset fp+ ~/.fonts/Type1For a Windows workstation:

You have to add additional mathematica fonts at your local PC. At the end of this webpage you can find an archive with these fonts (.zip)

If you use

- Create a new folder "Mathematica" in the diretory "fonts" of the installation directory of Xming. (mostly: C:\Programme\Xming\fonts\)
- Extract the fonts archive into this new directory "Mathematica".

In result you should have 2 directories "DBF" and "Type1".

- Add the path to these font files into the file "font-dirs".

You can find it in C:\Programme\Xming\.

# font-dirs # comma-separated list of directories to add to the default font path # defaults are built-ins, misc, TTF, Type1, 75dpi, 100dpi # also allows entries on individual lines C:\Programme\Xming\fonts\dejavu,C:\Programme\Xming\fonts\cyrillic C:\Programme\Xming\fonts\Mathematica\DBF C:\Programme\Xming\fonts\Mathematica\Type1 C:\WINDOWS\Fonts

Please use the Batchsystem SLURM for running calculations. This is a small example for a batch script, that you should prepair and start with command

sbatch <scriptname>

File "mathtest.m" is your input script, that includes the calculation statements for mathematica. File "mathtest.output" will collect the results of your calculation.

#!/bin/bash(also https://rcc.uchicago.edu/docs/software/environments/mathematica/index.html)

#SBATCH --output=mathtest.out

#SBATCH --error=mathtest.err

#SBATCH --time=00:05:00

#SBATCH --ntasks=1

module load mathematica

math -run < mathtest.m > mathtest.output

MATLAB is a numerical computing environment and programming language. Created by The MathWorks, MATLAB allows easy matrix manipulation, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs in other languages. Although it specializes in numerical computing, an optional toolbox interfaces with the Maple symbolic engine, allowing it to be part of a full computer algebra system.

Running MATLAB via the batch system could look like this (for 456 MB RAM per core and 12 cores reserved). Please adapt this to your needs!- SLURM (taurus, venus):

module load matlab

srun -t 8:00 -c 12 --mem-per-cpu=456 --pty --x11=first bash

matlab

With following command you can see a list of installed software - also the different versions of matlab.

module availPlease choose one of these, then load the chosen software with the command:

module load matlab/version

Or use:

module load matlab(then you will get the most recent Matlab version. Refer to the modules section for details.)

- if X-server is running and you logged in at the HPC systems, you should allocate a CPU for your work with command
srun --pty --x11=first bash

- now you can call "matlab" (you have 8h time to work with the matlab-GUI)

- you have to start matlab-calculation as a Batch-Job via command

srun --pty matlab -nodisplay -r basename_of_your_matlab_script #NOTE: you must omit the file extension ".m" here, because -r expects a matlab command or function call, not a file-name.

- compile your .m script to a binary:
mcc -m name_of_your_matlab_script.m -o compiled_executable -R -nodisplay -R -nosplash

- then run the binary via the wrapper script in a job (just a simple example, you should be using an sbatch script for that):
srun ./run_compiled_executable.sh $MCRROOT

- If you want to run your code in parallel, please request as many cores as you need!
- start a batch job with the number N <=12 of processes (Matlab is limited to 12)
- example for N= 4:
srun -c 4 --pty --x11=first bash

- run Matlab with the GUI or the CLI or with a script
- inside use
matlabpool open 4

to start parallel processing

- example for 1000*1000 matrixmutliplication

R = distributed.rand(1000); D = R * R

- to close parallel task:

matlabpool close

- start a batch job with the number N <=12 of processes (Matlab is limited to 12)
- inside use
matlabpool open N

ormatlabpool(N)

to start parallel processing. It will use the 'local' configuration by default. - Use 'parfor' for a parallel loop, where the
**independent**loop iterations are processed by N threads - Example:

parfor i = 1:3 c(:,i) = eig(rand(1000)); end

- see alsp
help parfor

- you have to set up a configuration:
- Parallel -> Manage Configurations
- File -> New -> hpcserver(css)
- Configuration name (Enter any name you like for the configuration)
- Description (Enter any description for the configuration you like)
- Root directory of MATLAB installation for workers (Please take care of the version number in the directory path)
- Number of workers available to scheduler (cores you need)
- HPC scheduler hostname (HPCSHN1)
- Cluster Version (check on which system you are running your jobs)

- to open 5 parallel tasks (in Command Window):

matlabpool open 'your configuration' 4

- example for 1000*1000 matrixmutliplication

R = distributed.rand(1000); D = R * R

- to close parallel task (in Command Window):

matlabpool close

- Construct a parallel job object using the default configuration.

pjob = createParallelJob();

- Add the task to the job (random 1000*1000 matrix).

createTask(pjob, 'rand', 1, {1000,1000});

- Set the number of workers (3 in this example) required for parallel execution.

set(pjob,'MinimumNumberOfWorkers',3); set(pjob,'MaximumNumberOfWorkers',3);

- Run the job.

submit(pjob);

- Wait for the job to finish running, and retrieve the job results.

waitForState(pjob); out = getAllOutputArguments(pjob);

- Destroy the job.

destroy(pjob);

GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

- Mathematica-Fonts.zip: Mathematica-Fonts