Software name: 

Theano is available to all users of HPC2N. It is installed with full GPU and cuDNN support.


Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.


Theano is a numerical computation library for Python. In Theano, computations are expressed using a NumPy-esque syntax and compiled to run efficiently on either CPU or GPU architectures. Theano is an open source project primarily developed by a machine learning group at the Université de Montréal.


On HPC2N we have Theano available as a module on Kebnekaise.

Usage at HPC2N 

To use the Theano module, first add it to your environment. Use:

module spider theano

to see which versions are available, as well as how to load the module and any needed prerequisites.

Note that while the case does not matter when you use "ml spider", it is necessary to match the case when loading the modules.

You can read more about loading modules on our Accessing software with Lmod page and our Using modules (Lmod) page.


When you use this Python module, a directory needs to be created, which is used for compiling etc. It is created automatically in your home directory first time you import the module in Python if you are running interactively, however this means trouble when you are running as a batch job since the batch system is not allowed to write to your home directory on AFS.

To solve this, delete the directory (and any subdirectories) from your home directory if it has already been created, and then create it in your pfs and make a symbolic link from your home directory:

cd /pfs/nobackup$HOME
mkdir .theano
cd $HOME
ln -s /pfs/nobackup$HOME/.theano .theano 
Additional info 

More information about Theano, including documentation and getting started guides can be found on the Theano homepage.

Updated: 2020-07-14, 21:10