- Get an Account and store your account name
export CSCS_USER=unixname
. - Configure direct access to the computing system. You can use the
ssh_config
template:
NOTE: check that you don't have any conflicting rules in$ cat >> ~/.ssh/config <<EOF Host * AddKeysToAgent yes # only for MacOS UseKeychain yes # only for MacOS IdentityFile ~/.ssh/id_rsa Host ela.cscs.ch User $CSCS_USER Match host !ela.cscs.ch,*.cscs.ch ControlMaster auto ControlPath ~/.ssh/%r@%h:%p ControlPersist 1 User $CSCS_USER ProxyCommand ssh -q -Y ela.cscs.ch -W %h:%p EOF
~/.ssh/config
. - Connect to the computing system (in following example use
export CSCS_SYSTEM=daint.cscs.ch
orexport CSCS_SYSTEM=dom.cscs.ch
) usingssh $CSCS_SYSTEM
.
- Make sure you are connected to
$CSCS_SYSTEM
(check previous section). - Configure direct access to nodes without password:
$ ssh-keygen $ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
- Start new compute node in interactive mode:
srun -C gpu -J test -v -u bash -i
and check the output ofuname -a
. - From new terminal start new SSH connection to
$CSCS_SYSTEM
and check the job:Compare the output from step 2 and if they are equal the connection was successful. Now close this terminal.(local)$ ssh $CSCS_SYSTEM ($CSCS_SYSTEM)$ squeue -u $USER -l Tue May 9 07:43:20 2017 JOBID PARTITION NAME USER STATE TIME TIME_LIMI NODES NODELIST(REASON) 123456 normal test $USER RUNNING 0:15 1:00:00 1 nid00000 ($CSCS_SYSTEM)$ export CSCS_NODE=nid00000 # the name in last column ($CSCS_SYSTEM)$ ssh $CSCS_NODE ($CSCS_NODE)$ uname -a Linux nid00000 3.12.60-52.49.1_2.0-cray_ari_c #1 SMP Mon Nov 21 15:40:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
- Close the running
srun
command by pressingctrc+c
twice. - Include lines from
.bashrc
and runsource ~/.bashrc
to test it. - Install IPython kernel:
pip install --user ipython[kernel]
and check its version:ipython kernel --version
. - Verify the IPython kernel version on new compute node:
srun -C gpu -J test -v -u ipython kernel --version
- Make sure that you have Jupyter notebook installed otherwise run
pip install --user jupyter[notebook]
and check the version:$ jupyter notebook --version 5.0.0
- Install Remote IKernel package:
pip install --user remote_ikernel
and check the version:$ remote_ikernel --version Remote Jupyter kernel launcher (version 0.4.5). ...
- Configure remote kernel using SLURM interface:
$ remote_ikernel manage --add \ --kernel_cmd="ipython kernel -f {connection_file}" \ --name=CSCS \ --language=Python3 \ --interface=slurm \ --tunnel-hosts $CSCS_SYSTEM \ --launch-cmd="srun -C gpu"
- Launch Jupyter notebook and select the CSCS kernel:
jupyter notebook
.
In case you don't want to edit your .bashrc
, you can use --precmd
option:
$ export CSCS_PRECMD=`cat - <<EOF
env -i bash --norc --noprofile
export PATH=$PATH:~/.local/bin
module load daint-gpu
module load TensorFlow/1.0.0-CrayGNU-2016.11-cuda-8.0-Python-3.5.2
EOF
`
$ ... --remote-precmd="$CSCS_PRECMD"
NOTE: check that resulting kernel.json
does not include double backslashes.