|
|
**Tables of Contents**
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
# Running your job remotely
|
|
|
Running your job remotely is far more difficult but more expressive and useful. One of the major benefits is the ability to use massively parallel clusters. What could take literal days in our pipeline locally may only take a couple hours remotely. When we run remotely we assume you will be using Octave and not Matlab.
|
|
|
|
|
|
This page assumes you read [running your job locally](tutorial-running-locally).
|
|
|
|
|
|
This page may not give you enough information to get a job running remotely. We model our pipeline on the Compute Canada clusters which run Slurm schedulers. We will talk about the various configuration files required and what needs to be in them with examples from our own environment.
|
|
|
|
|
|
## Copy your files to the cluster
|
|
|
Batch Context operates on the assumption that they remote and local are roughly synchronized. You can do this by using `rsync`, `scp` or `sshfs` if you prefer to use `meld` or another GUI program to sync two directories.
|
|
|
|
|
|
# Ensure your remote environment works
|
|
|
octave.sessinit and amica.sessinit have to be capable of setting up Octave and Amica to run on the remote cluster. For Octave this means that Octave must be in the path and must have packages(like signal/control) installed.
|
|
|
|
|
|
On the Compute Canada clusters Octave is not available in the default environment.
|
|
|
|
|
|
## Octave sessinit
|
|
|
Our Octave sessinit just loads the most up to date Octave module from our cluster
|
|
|
|
|
|
`config/octave.sessinit`
|
|
|
```shell
|
|
|
module load octave
|
|
|
```
|
|
|
## Amica sessinit
|
|
|
Our Amica sessinit unloads the default version of the Intel compiler and loads a more specific/newer one. As well as the Intel Math Kernel Libraries.
|
|
|
|
|
|
`config/amica.sessinit`
|
|
|
```shell
|
|
|
#OMPI_MCA_mpi_cuda_support=0
|
|
|
#export OMPI_MCA_mpi_cuda_support
|
|
|
|
|
|
module unload intel
|
|
|
module load intel/2017.1
|
|
|
module load imkl/2017.1.132
|
|
|
```
|
|
|
|
|
|
## Octave minit
|
|
|
Unlike Matlab where we can assume that the user has opened EEGLAB by virtue of having Batch Context open on the cluster we cannot. So instead we use the Octave.minit to ensure our Octave environment has the correct path and that we start eeglab to let it load the plugins. We have also included some code that makes Octave act more like Matlab for what we need it for, in lieu of using `--traditional/--braindead`.
|
|
|
|
|
|
Note this assumes you have signal installed, we use Octave forge signal in order to do signal processing in the
|
|
|
[eeg_pipe_asr_amica pipeline](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica)
|
|
|
but you may need it as well so we leave this in for future modifications.
|
|
|
|
|
|
`config/octave.minit`
|
|
|
```matlab
|
|
|
pkg load signal;
|
|
|
addpath([pwd '/dependencies/eeglab']);
|
|
|
cd '[:,1,remote_project_work]';
|
|
|
|
|
|
% eeglab auto loads the path correctly instead of shotgun blasting with
|
|
|
% addpath(genpath(<>)) as we were doing prior
|
|
|
if ~exist('EEG', 'var')
|
|
|
eeglab;
|
|
|
end
|
|
|
|
|
|
% Don't run with traditional but enable some of the options
|
|
|
save_default_options ('-mat-binary');
|
|
|
confirm_recursive_rmdir(false);
|
|
|
|
|
|
% This makes | and & || and && in earlier version of Octave where
|
|
|
% | and & dont short curcuit by default
|
|
|
if exist('do_braindead_shortcircuit_evaluation', 'builtin')
|
|
|
do_braindead_shortcircuit_evaluation(true);
|
|
|
end
|
|
|
|
|
|
% Options
|
|
|
pop_editoptions('option_savetwofiles', 1,'option_single',0);
|
|
|
```
|
|
|
|
|
|
*Updated/Verified by Brad Kennedy on 2017-08-14*
|
|
|
|
|
|
[ :arrow_up: Top of Page](home) |
|
|
\ No newline at end of file |