{"id":4468,"date":"2018-03-01T09:21:48","date_gmt":"2018-03-01T09:21:48","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=4468"},"modified":"2018-03-08T14:28:54","modified_gmt":"2018-03-08T14:28:54","slug":"pygmo","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/pygmo\/","title":{"rendered":"PyGMO"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"https:\/\/esa.github.io\/pagmo2\/index.html\">PyGMO<\/a> is a scientific library for massively parallel optimization. It is built around the idea of providing a unified interface to optimization algorithms and to optimization problems and to make their deployment in massively parallel environments easy.<\/p>\n<p>Version 2.6 is installed on the CSF. This can use Anaconda Python v5.1.0 (python 3.6.4) or v4.2.0 (python 3.5.2).<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on accessing PyGMO on the CSF. The source is released under the GNU GPL v3 license.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load <em>one<\/em> of the following modulefile:<\/p>\n<pre>\r\nmodule load apps\/gcc\/python-packages\/anaconda3-5.1.0\/pygmo\/2.6\r\nmodule load apps\/gcc\/python-packages\/anaconda3-4.2.0\/pygmo\/2.6\r\n<\/pre>\n<p>The modulefile will automatically load the required version of Anaconda modulefile for you.<\/p>\n<h2>Running the application<\/h2>\n<p>Please do not run PyGMO on the login node. Jobs should be submitted to the compute nodes via batch. <\/p>\n<p>Ensure that your python script reads the number of cores your job has reserved in the batch system by getting the <code>$NSLOTS<\/code> environment variable. You should then pass this value to the PyGMO python functions to ensure your code only uses that number of cores. For example:<\/p>\n<pre>\r\nimport pygmo as pg\r\nimport os\r\n\r\n# Get number of cores reserved by the batch system (NSLOTS is automatically set, or use 1 if not)\r\nNUMCORES=int(os.getenv(\"NSLOTS\",1))\r\nprint(\"Using\", NUMCORES, \"core(s)\" )\r\n\r\n# Use NUMCORES in your python code as required...\r\n<\/pre>\n<h3>Serial batch job submission<\/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\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<\/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 8     # Number of cores to use (2-24)\r\n\r\n# You must ensure your python script reads the $NSLOTS environment variable\r\n# to obtain the correct number of cores to use. Please read the PyGMO docs\r\n# to determine how to pass this number to PyGMO.\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<h2>Further info<\/h2>\n<ul>\n<li><a href=\"https:\/\/esa.github.io\/pagmo2\/docs\/python\/python_docs.html\">PyGMO python docs<\/a><\/li>\n<li><a href=\"https:\/\/esa.github.io\/pagmo2\/docs\/python\/tutorials\/python_tut.html\n\"><\/a>PyGMO python tutorials<\/li>\n<li><a href=\"https:\/\/esa.github.io\/pagmo2\">PyGMO website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview PyGMO is a scientific library for massively parallel optimization. It is built around the idea of providing a unified interface to optimization algorithms and to optimization problems and to make their deployment in massively parallel environments easy. Version 2.6 is installed on the CSF. This can use Anaconda Python v5.1.0 (python 3.6.4) or v4.2.0 (python 3.5.2). Restrictions on use There are no restrictions on accessing PyGMO on the CSF. The source is released under.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/pygmo\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4468","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4468","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=4468"}],"version-history":[{"count":5,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4468\/revisions"}],"predecessor-version":[{"id":4484,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4468\/revisions\/4484"}],"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=4468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}