Brian

From oldwiki.scinet.utoronto.ca
Revision as of 10:52, 7 April 2011 by Dgruner (talk | contribs)
Jump to navigation Jump to search

Brian is a python package. Here are instructions on how to install it locally, in a user's home directory:

<source lang=bash> module purge module load use.experimental gcc/4.4.0 intel/intel-v12.0.0.084 python/2.7.1 mkdir -p $HOME/lib/python2.7/site-packages

export PYTHONPATH=${PYTHONPATH}:${HOME}/lib/python2.7/site-packages/

easy_install --prefix=${HOME} -O1 SymPy

easy_install --prefix=${HOME} -O1 Brian </source>

After these steps, add the local module "brian" to your own modules directory. This is done by first executing the command:

<source lang=bash> module load use.own </source>

which creates the directory $HOME/privatemodules . Then change to that directory, and do

<source lang=bash> cd $HOME/privatemodules mkdir brian cd brian </source>

In this directory create a file, with the name "1.3.0" (this is the version of Brian we are installing), with the contents:

<source lang=tcl>

  1. %Module -*- tcl -*-
  1. Brian

proc ModulesHelp { } {

 puts stderr "\tThis module adds Brian 1.3.0 environment variables" 

}

module-whatis "adds Brian 1.3.0 environment variables"

  1. python was compiled with gcc, but needs intel for the MKL.
  2. it requires python 2.7.1

prereq use.experimental prereq gcc prereq intel/intel-v12.0.0.084 prereq python/2.7.1

set basedir $::env(HOME)/lib/python2.7 append-path PYTHONPATH ${basedir}/site-packages/:${basedir}/site-packages/sympy-0.6.7-py2.7.egg/:${basedir}/site-packages/brian-1.3.0-py2.7.egg/ </source>

After you save the file, if you do

<source lang=bash> module load use.own module avail </source>

you will see the module brian/1.3.0 listed. You can now load it, together with its prerequisites, and you should be ready to run brian simulations. You can load these modules inside a batch script, as follows:

<source lang=bash> module purge module load use.experimental use.own module load gcc module load intel/intel-v12.0.0.084 module load python/2.7.1 module load brian </source>

This will take care of all your necessary environment variables, as well as making sure the proper versions of the required packages are loaded.