{"id":3111,"date":"2016-06-15T17:57:29","date_gmt":"2016-06-15T17:57:29","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=3111"},"modified":"2017-03-30T10:49:00","modified_gmt":"2017-03-30T10:49:00","slug":"theano","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/theano\/","title":{"rendered":"Theano"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/deeplearning.net\/software\/theano\/\">Theano<\/a> is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently.<\/p>\n<p>Version 0.8.2 is installed on the CSF. It uses the CUDA 5.5.22 library on the GPU nodes.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on running Theano. However, access to the GPU nodes is not possible until you have been added to the correct group. Please contact <a href=\"&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#58;&#x69;t&#x73;-&#x72;i&#x2d;t&#101;&#x61;&#109;&#x40;&#109;&#x61;&#110;&#x63;&#104;&#x65;s&#x74;e&#x72;&#46;&#x61;c&#46;&#x75;&#107;\">i&#116;&#x73;&#x2d;&#x72;i&#45;&#x74;&#x65;&#x61;m&#64;&#x6d;&#x61;&#x6e;c&#104;&#x65;&#x73;&#x74;e&#114;&#x2e;&#x61;&#x63;&#46;&#117;&#x6b;<\/a> to request this.<\/p>\n<p>You are encouraged to cite the library in any research. Please see the <a href=\"http:\/\/deeplearning.net\/software\/theano\/#citing-theano\">citation page<\/a> for details.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load the modulefile:<\/p>\n<pre>\r\nmodule load apps\/binapps\/theano\/0.8.2\r\n<\/pre>\n<p>This will automatically load the Anaconda v2.5.0 Python module files (which provides python 2.7.11) and also the CUDA 5.5.22 modulefile.<\/p>\n<p>If you require the PyCUDA libraries please also load the following additional modulefile:<\/p>\n<pre>\r\nmodule load libs\/gcc\/pycuda\/2016.1.1\r\n<\/pre>\n<h2>Running the application<\/h2>\n<p>Please do not run Theano on the login node. Jobs should be submitted to the compute nodes via batch.<\/p>\n<h3>Serial batch job submission &#8211; GPU<\/h3>\n<p>Make sure you have the modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd             # Job will run from the current directory\r\n#$ -V               # Job will inherit current environment settings\r\n##### Use ONE of the following to select a GPU node\r\n#$ -l nvidia       # Nvidia M2050\r\n#$ -l nvidia_k20   # Nvidia K20 (restricted to specific research group)\r\n\r\npython myscript.py\r\n<\/pre>\n<p>Submit the jobscript using: <\/p>\n<pre>qsub <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<h3>Parallel batch job submission &#8211; CPU<\/h3>\n<p>Make sure you have the modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd             # Job will run from the current directory\r\n#$ -V               # Job will inherit current environment settings\r\n#$ -pe smp.pe 4     # 4 core job\r\n\r\n# The next line ensures that the software automatically uses the no. of cores requested (in this case 4)\r\n\r\nexport OMP_NUM_THREADS=$NSLOTS\r\n\r\npython myscript.py\r\n<\/pre>\n<h3>Interactive Usage<\/h3>\n<p>To use python interactively first start an <em>interactive session<\/em> on a GPU node using:<\/p>\n<pre>\r\n# Access to M2050 GPU\r\nqrsh -l inter -l nvidia\r\n\r\n# Access to K20 GPU\r\nqrsh -l inter -l nvidia_k20\r\n\r\n# When logged in to a GPU node, set up as before:\r\nmodule load apps\/binapps\/theano\/0.8.2\r\npython\r\n>>> import theano\r\n>>> ... python code...\r\n\r\n\/\/ When finished:\r\nCtrl-d\r\n\r\n# Now end your interactive session to return to the CSF login node\r\nexit\r\n<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/deeplearning.net\/software\/theano\/#\">Theano website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. Version 0.8.2 is installed on the CSF. It uses the CUDA 5.5.22 library on the GPU nodes. Restrictions on use There are no restrictions on running Theano. However, access to the GPU nodes is not possible until you have been added to the correct group. Please contact &#105;&#116;&#x73;-&#114;&#x69;&#x2d;t&#101;&#x61;&#x6d;&#64;&#109;&#x61;&#x6e;c&#104;&#x65;&#x73;t&#101;&#x72;&#x2e;a&#99;&#x2e;u&#107; to request this. You are encouraged to.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/theano\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3111","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=3111"}],"version-history":[{"count":6,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3111\/revisions"}],"predecessor-version":[{"id":3739,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3111\/revisions\/3739"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=3111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}