Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
doku:matlab-save [2015/05/12 09:56] – created irdoku:matlab-save [2015/05/12 10:27] – [Example: Local Matlabpool] ir
Line 183: Line 183:
 </code> </code>
  
 +==== Example: Serial Matlab Task ====
  
 +Analogously to VSC-2, we use the matlab m-file {{doku:myplot.m|myplot.m}} and create a file called ''jobSerial.sh'' as your job script, with the following basic contents:
 +<code>
 +#!/bin/bash
 +#
 +#SBATCH -J test                     # job name
 +#SBATCH -N 1                        # number of nodes
 +#SBATCH --ntasks-per-node=1       
 +#SBATCH --ntasks-per-core=1
 +#SBATCH --threads-per-core=1
 +#SBATCH --time=10                   # run time unit=minutes
 +
 +export OMP_NUM_THREADS=1
 +
 +time matlab < myplot.m
 +</code>
 +
 +<code>
 +[username@l32]$ sbatch jobSerial.sh   # submit your job
 +[username@l32]$ squeue -u username    # check state of your job
 +</code>
 +
 +==== Example: Local Matlabpool ====
 +We use the same m-file ''main.m'' as done for VSC-2 and create the following shellscript ''jobPool.sh''