If you need to use the Matlab GUI to prepare your Matlab programs, you can use Matlab directly on the login nodes. But for all computations use Matlab on the compute nodes via PBS Pro scheduler.
If you require the Matlab GUI, follow the general information about [running graphical applications](general/accessing-the-clusters/graphical-user-interface/x-window-system/).
If you require the Matlab GUI, follow the general information about [running graphical applications][1].
Matlab GUI is quite slow using the X forwarding built in the PBS (qsub -X), so using X11 display redirection either via SSH or directly by xauth (see the "GUI Applications on Compute Nodes over VNC" part [here](general/accessing-the-clusters/graphical-user-interface/x-window-system/)) is recommended.
Matlab GUI is quite slow using the X forwarding built in the PBS (qsub -X), so using X11 display redirection either via SSH or directly by xauth (see the "GUI Applications on Compute Nodes over VNC" part [here][1]) is recommended.
To run Matlab with GUI, use
...
...
@@ -43,7 +43,7 @@ plots, images, etc... will be still available.
Distributed toolbox is available only for the EDU variant
The MPIEXEC mode available in previous versions is no longer available in MATLAB 2015. Also, the programming interface has changed. Refer to [Release Notes](http://www.mathworks.com/help/distcomp/release-notes.html#buanp9e-1).
The MPIEXEC mode available in previous versions is no longer available in MATLAB 2015. Also, the programming interface has changed. Refer to [Release Notes][a].
Delete previously used file mpiLibConf.m, we have observed crashes when using Intel MPI.
...
...
@@ -68,7 +68,7 @@ With the new mode, MATLAB itself launches the workers via PBS, so you can either
### Parallel Matlab Interactive Session
Following example shows how to start interactive session with support for Matlab GUI. For more information about GUI based applications on Anselm see [this page](general/accessing-the-clusters/graphical-user-interface/x-window-system/).
Following example shows how to start interactive session with support for Matlab GUI. For more information about GUI based applications on Anselm see [this page][1].
```console
$ xhost +
...
...
@@ -218,7 +218,7 @@ This method is a "hack" invented by us to emulate the mpiexec functionality foun
!!! warning
This method is experimental.
For this method, you need to use SalomonDirect profile, import it using [the same way as SalomonPBSPro](#running-parallel-matlab-using-distributed-computing-toolbox---engine)
For this method, you need to use SalomonDirect profile, import it using [the same way as SalomonPBSPro][2].
This is an example of m-script using direct mode:
...
...
@@ -249,11 +249,11 @@ delete(pool)
### Non-Interactive Session and Licenses
If you want to run batch jobs with Matlab, be sure to request appropriate license features with the PBS Pro scheduler, at least the `-l __feature__matlab__MATLAB=1` for EDU variant of Matlab. More information about how to check the license features states and how to request them with PBS Pro, [look here](software/isv_licenses/).
If you want to run batch jobs with Matlab, be sure to request appropriate license features with the PBS Pro scheduler, at least the `-l __feature__matlab__MATLAB=1` for EDU variant of Matlab. More information about how to check the license features states and how to request them with PBS Pro, [look here][3].
The licensing feature of PBS is currently disabled.
In case of non-interactive session read the [following information](software/isv_licenses/) on how to modify the qsub command to test for available licenses prior getting the resource allocation.
In case of non-interactive session read the [following information][3] on how to modify the qsub command to test for available licenses prior getting the resource allocation.
### Matlab Distributed Computing Engines Start Up Time
...
...
@@ -278,4 +278,11 @@ Since this is a SMP machine, you can completely avoid using Parallel Toolbox and
### Local Cluster Mode
You can also use Parallel Toolbox on UV2000. Use [local cluster mode](#parallel-matlab-batch-job-in-local-mode), "SalomonPBSPro" profile will not work.
You can also use Parallel Toolbox on UV2000. Use [local cluster mode][4], "SalomonPBSPro" profile will not work.
This document relates to the old versions R2013 and R2014. For MATLAB 2015 use [this documentation instead](software/numerical-languages/matlab/).
This document relates to the old versions R2013 and R2014. For MATLAB 2015 use [this documentation instead][1].
Matlab is available in the latest stable version. There are always two variants of the release:
...
...
@@ -190,9 +190,9 @@ You can copy and paste the example in a .m file and execute. Note that the matla
### Non-Interactive Session and Licenses
If you want to run batch jobs with Matlab, be sure to request appropriate license features with the PBS Pro scheduler, at least the ` -l __feature__matlab__MATLAB=1` for EDU variant of Matlab. More information about how to check the license features states and how to request them with PBS Pro, [look here](software/isv_licenses/).
If you want to run batch jobs with Matlab, be sure to request appropriate license features with the PBS Pro scheduler, at least the ` -l __feature__matlab__MATLAB=1` for EDU variant of Matlab. More information about how to check the license features states and how to request them with PBS Pro, [look here][2].
In case of non-interactive session read the [following information](software/isv_licenses/) on how to modify the qsub command to test for available licenses prior getting the resource allocation.
In case of non-interactive session read the [following information][2] on how to modify the qsub command to test for available licenses prior getting the resource allocation.
### Matlab Distributed Computing Engines Start Up Time
...
...
@@ -204,3 +204,6 @@ Starting Matlab workers is an expensive process that requires certain amount of
GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used through its interactive command line interface, but it can also be used to write non-interactive programs. The Octave language is quite similar to Matlab so that most programs are easily portable. Read more on [http://www.gnu.org/software/octave/](http://www.gnu.org/software/octave/)
GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used through its interactive command line interface, but it can also be used to write non-interactive programs. The Octave language is quite similar to Matlab so that most programs are easily portable. Read more [her][a].
For looking for avaible modules, type:
...
...
@@ -48,7 +48,7 @@ cp output.out $PBS_O_WORKDIR/.
exit
```
This script may be submitted directly to the PBS workload manager via the qsub command. The inputs are in octcode.m file, outputs in output.out file. See the single node jobscript example in the [Job execution section](../../salomon/job-submission-and-execution/).
This script may be submitted directly to the PBS workload manager via the qsub command. The inputs are in octcode.m file, outputs in output.out file. See the single node jobscript example in the [Job execution section][1].
The octave c compiler mkoctfile calls the GNU gcc 4.8.1 for compiling native c code. This is very useful for running native c subroutines in octave environment.
...
...
@@ -56,15 +56,15 @@ The octave c compiler mkoctfile calls the GNU gcc 4.8.1 for compiling native c c
$ mkoctfile -v
```
Octave may use MPI for interprocess communication This functionality is currently not supported on Anselm cluster. In case you require the octave interface to MPI, contact [Anselm support](https://support.it4i.cz/rt/).
Octave may use MPI for interprocess communication This functionality is currently not supported on Anselm cluster. In case you require the octave interface to MPI, contact [Anselm support][b].
## Xeon Phi Support
Octave may take advantage of the Xeon Phi accelerators. This will only work on the [Intel Xeon Phi](software/intel/intel-xeon-phi-salomon/)[accelerated nodes](salomon/compute-nodes/).
Octave may take advantage of the Xeon Phi accelerators. This will only work on the [Intel Xeon Phi][2][accelerated nodes][3].
### Automatic Offload Support
Octave can accelerate BLAS type operations (in particular the Matrix Matrix multiplications] on the Xeon Phi accelerator, via [Automatic Offload using the MKL library](software/intel/intel-xeon-phi-salomon/)
Octave can accelerate BLAS type operations (in particular the Matrix Matrix multiplications] on the Xeon Phi accelerator, via [Automatic Offload using the MKL library][2].
Example
...
...
@@ -88,7 +88,7 @@ In this example, the calculation was automatically divided among the CPU cores a
### Native Support
A version of [native](software/intel/intel-xeon-phi-salomon/) Octave is compiled for Xeon Phi accelerators. Some limitations apply for this version:
A version of [native][2] Octave is compiled for Xeon Phi accelerators. Some limitations apply for this version:
* Only command line support. GUI, graph plotting etc. is not supported.
* Command history in interactive mode is not supported.
...
...
@@ -97,7 +97,7 @@ Octave is linked with parallel Intel MKL, so it best suited for batch processing
variable.
!!! note
Calculations that do not employ parallelism (either by using parallel MKL e.g. via matrix operations, fork() function, [parallel package](http://octave.sourceforge.net/parallel/) or other mechanism) will actually run slower than on host CPU.
Calculations that do not employ parallelism (either by using parallel MKL e.g. via matrix operations, fork() function, [parallel package][c] or other mechanism) will actually run slower than on host CPU.
To use Octave on a node with Xeon Phi:
...
...
@@ -106,3 +106,10 @@ $ ssh mic0 # login to the MIC card
$source /apps/tools/octave/3.8.2-mic/bin/octave-env.sh # set up environment variables
$ octave -q /apps/tools/octave/3.8.2-mic/example/test0.m # run an example
@@ -10,7 +10,7 @@ Another convenience is the ease with which the C code or third party libraries m
Extensive support for parallel computing is available within R.
Read more on [http://www.r-project.org/](http://www.r-project.org/), [http://cran.r-project.org/doc/manuals/r-release/R-lang.html](http://cran.r-project.org/doc/manuals/r-release/R-lang.html)
Read more on [http://www.r-project.org/][a], [http://cran.r-project.org/doc/manuals/r-release/R-lang.html][b].
This script may be submitted directly to the PBS workload manager via the qsub command. The inputs are in rscript.R file, outputs in routput.out file. See the single node jobscript example in the [Job execution section - Anselm](anselm/job-submission-and-execution/).
This script may be submitted directly to the PBS workload manager via the qsub command. The inputs are in rscript.R file, outputs in routput.out file. See the single node jobscript example in the [Job execution section - Anselm][1].
## Parallel R
Parallel execution of R may be achieved in many ways. One approach is the implied parallelization due to linked libraries or specially enabled functions, as [described above](#interactive-execution). In the following sections, we focus on explicit parallelization, where parallel constructs are directly stated within the R script.
Parallel execution of R may be achieved in many ways. One approach is the implied parallelization due to linked libraries or specially enabled functions, as [described above][2]. In the following sections, we focus on explicit parallelization, where parallel constructs are directly stated within the R script.
## Package Parallel
...
...
@@ -144,9 +144,9 @@ Every evaluation of the integrad function runs in parallel on different process.
package Rmpi provides an interface (wrapper) to MPI APIs.
It also provides interactive R slave environment. On the cluster, Rmpi provides interface to the [OpenMPI](software/mpi/running_openmpi/).
It also provides interactive R slave environment. On the cluster, Rmpi provides interface to the [OpenMPI][3].
Read more on Rmpi at <http://cran.r-project.org/web/packages/Rmpi/>, reference manual is available at [here](http://cran.r-project.org/web/packages/Rmpi/Rmpi.pdf)
Read more on Rmpi [here][c], reference manual is available [here][d].
When using package Rmpi, both openmpi and R modules must be loaded
...
...
@@ -345,7 +345,7 @@ while (TRUE)
mpi.quit()
```
The above is the mpi.apply MPI example for calculating the number π. Only the slave processes carry out the calculation. Note the **mpi.parSapply()**, function call. The package parallel [example](#package-parallel)[above](#package-parallel) may be trivially adapted (for much better performance) to this structure using the mclapply() in place of mpi.parSapply().
The above is the mpi.apply MPI example for calculating the number π. Only the slave processes carry out the calculation. Note the **mpi.parSapply()**, function call. The package parallel example above may be trivially adapted (for much better performance) to this structure using the mclapply() in place of mpi.parSapply().
Execute the example as:
...
...
@@ -361,7 +361,7 @@ Currently, the two packages can not be combined for hybrid calculations.
The R parallel jobs are executed via the PBS queue system exactly as any other parallel jobs. User must create an appropriate jobscript and submit via the **qsub**
Example jobscript for [static Rmpi](#static-rmpi) parallel R execution, running 1 process per core:
Example jobscript for [static Rmpi][4] parallel R execution, running 1 process per core:
For more information about jobscripts and MPI execution refer to the [Job submission](anselm/job-submission-and-execution/) and general [MPI](software/mpi/mpi/) sections.
For more information about jobscripts and MPI execution refer to the [Job submission][1] and general [MPI][5] sections.
## Xeon Phi Offload
...
...
@@ -400,4 +400,16 @@ By leveraging MKL, R can accelerate certain computations, most notably linear al
$export MKL_MIC_ENABLE=1
```
[Read more about automatic offload](software/intel/intel-xeon-phi-salomon/)