Difference between revisions of "Brian"
m |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{OutOfDate}} | ||
[http://www.briansimulator.org/ Brian] is a python package. Here are instructions on how to install it locally, in a user's home directory: | [http://www.briansimulator.org/ Brian] is a python package. Here are instructions on how to install it locally, in a user's home directory: | ||
Line 19: | Line 20: | ||
</source> | </source> | ||
− | which creates the directory $HOME/privatemodules . Then change to that directory, and do | + | which creates the directory $HOME/privatemodules . In that directory we will create a file named "localpython", which will |
+ | be used for all user-installed python packages. Here are the contents of $HOME/privatemodules/localpython: | ||
+ | |||
+ | <source lang=tcl> | ||
+ | #%Module -*- tcl -*- | ||
+ | |||
+ | proc ModulesHelp { } { | ||
+ | puts stderr "\tThis module adds local python 2.7.1 path environment variable" | ||
+ | } | ||
+ | |||
+ | module-whatis "adds local python 2.7.1 path environment variable" | ||
+ | |||
+ | set basedir $::env(HOME)/lib/python2.7 | ||
+ | append-path PYTHONPATH ${basedir}/site-packages/ | ||
+ | </source> | ||
+ | |||
+ | |||
+ | Then change to that directory, and do | ||
<source lang=bash> | <source lang=bash> | ||
Line 47: | Line 65: | ||
prereq intel/intel-v12.0.0.084 | prereq intel/intel-v12.0.0.084 | ||
prereq python/2.7.1 | prereq python/2.7.1 | ||
+ | |||
+ | module load localpython | ||
set basedir $::env(HOME)/lib/python2.7 | set basedir $::env(HOME)/lib/python2.7 | ||
− | append-path PYTHONPATH | + | append-path PYTHONPATH ${basedir}/site-packages/sympy-0.6.7-py2.7.egg/:${basedir}/site-packages/brian-1.3.0-py2.7.egg/ |
</source> | </source> | ||
Line 63: | Line 83: | ||
<source lang=bash> | <source lang=bash> | ||
module purge | module purge | ||
− | |||
module load gcc | module load gcc | ||
module load intel/intel-v12.0.0.084 | module load intel/intel-v12.0.0.084 | ||
+ | module load use.experimental | ||
module load python/2.7.1 | module load python/2.7.1 | ||
module load use.own | module load use.own | ||
− | module load brian | + | module load brian/1.3.0 |
</source> | </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. | This will take care of all your necessary environment variables, as well as making sure the proper versions of the required packages are loaded. |
Latest revision as of 16:18, 17 June 2013
WARNING: The last edit of this page is over two years old. The information on this page may be out-of-date. |
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 . In that directory we will create a file named "localpython", which will be used for all user-installed python packages. Here are the contents of $HOME/privatemodules/localpython:
<source lang=tcl>
- %Module -*- tcl -*-
proc ModulesHelp { } {
puts stderr "\tThis module adds local python 2.7.1 path environment variable"
}
module-whatis "adds local python 2.7.1 path environment variable"
set basedir $::env(HOME)/lib/python2.7 append-path PYTHONPATH ${basedir}/site-packages/ </source>
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>
- %Module -*- tcl -*-
- Brian
proc ModulesHelp { } {
puts stderr "\tThis module adds Brian 1.3.0 environment variables"
}
module-whatis "adds Brian 1.3.0 environment variables"
- python was compiled with gcc, but needs intel for the MKL.
- it requires python 2.7.1
prereq use.experimental prereq gcc prereq intel/intel-v12.0.0.084 prereq python/2.7.1
module load localpython
set basedir $::env(HOME)/lib/python2.7 append-path PYTHONPATH ${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 gcc module load intel/intel-v12.0.0.084 module load use.experimental module load python/2.7.1 module load use.own module load brian/1.3.0 </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.