The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
Chainer
Overview
Chainer is a flexible framework for neural networks in Python. Chainer adopts a Define-by-Run scheme, i.e., the network is defined on-the-fly via the actual forward computation.
Version 1.22.0 and 3.2.0 is installed on the CSF. It is a CPU-only build – no support for GPU usage is available.
Restrictions on use
There are no access restrictions on the CSF.
Set up procedure
To access the software you must first load the relevant modulefile:
module load apps/gcc/python-packages/anaconda3-4.2.0/chainer/4.2.0 module load apps/gcc/python-packages/anaconda3-4.2.0/chainer/3.2.0 module load apps/gcc/python-packages/anaconda3-4.2.0/chainer/1.22.0
This will automatically load the Anaconda3 v4.2.0 Python module files (which provides python 3.5.2).
Running the application
Please do not run Chainer on the login node. Work should be submitted to batch.
Serial batch job submission
Make sure you have the Chainer modulefile loaded then create a batch submission script, for example:
#!/bin/bash #$ -cwd # Run job from directory where submitted #$ -V # Inherit environment (modulefile) settings python my_chainer_code.py
Submit your jobscript from the login node using
qsub jobscript
where jobscript
is the name of your jobscript.
Interactive usage example
The following example runs one of the Chainer example scripts interactively on a compute node. You could also submit this to the batch system by placing the commands to execute the python scripts in a jobscript.
The Chainer examples are installed in the directory
$CHAINER_EXAMPLES
For example, to see the mnist
files:
ls $CHAINER_EXAMPLES/mnist/
Interactive Serial Job Example
To run the mnist example interactively on a compute node, do the following from the login node:
# This command is run on the login node qrsh -l inter -l short # Wait until you are logged in to a compute node, then module load apps/gcc/python-packages/anaconda3-4.2.0/chainer/1.22.0 # The example will download some data, so run in your scratch area cd ~/scratch # Run the example code on the CPU $CHAINER_EXAMPLES/mnist/train_mnist.py # # # # The example will download data then process it on the CPU. # Return to the login node when done to free the compute node for another user exit
Further info
Updates
None.