{"id":2423,"date":"2015-09-04T10:55:07","date_gmt":"2015-09-04T08:55:07","guid":{"rendered":"http:\/\/srvcnthpc001.uct.ac.za\/?p=2423"},"modified":"2015-09-15T16:31:05","modified_gmt":"2015-09-15T14:31:05","slug":"octave","status":"publish","type":"post","link":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/","title":{"rendered":"Octave"},"content":{"rendered":"<p>We have installed <a href=\"https:\/\/www.gnu.org\/software\/octave\/\" target=\"_blank\">GNU Octave<\/a>\u00a0on our clusters. From their website:<\/p>\n<p><em>&#8220;GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used through its interactive command line interface, but it can also be used to write non-interactive programs. The Octave language is quite similar to Matlab so that most programs are easily portable.&#8221;<\/em><\/p>\n<p>It seems to work well and we have managed to get the latest version, 4.0.0, to compile with all the relevant mathematical libraries, FFTW3, ARPACK, AMD, CHOLMOD etc. However the really nice thing about it is that it&#8217;s <a href=\"https:\/\/www.gnu.org\/software\/octave\/license.html\" target=\"_blank\">free<\/a>.\u00a0While one can cut and paste Matlab scripts directly into Octave you may need to edit them slightly, for example\u00a0it appears that unlike Matlab you need to predefine your variables.\u00a0To launch Octave just run the binary:<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2421\" src=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1-300x140.jpg\" alt=\"octave1\" width=\"300\" height=\"140\" srcset=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1-300x140.jpg 300w, https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1.jpg 530w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nIn the example above you will note the X11 DISPLAY error. Setting the DISPLAY environment variable allows one to export the graphical user interface (GUI) back to your desktop. So submitting a cluster job with the commands:<\/p>\n<pre>export DISPLAY=my.ip.addr:0.0\r\n\/home\/exp_soft\/octave-4.0.0\/bin\/octave --force-gui<\/pre>\n<p>Will launch a job on a worker node and provide a GUI on your desktop. Below is an example of a user launching Octave with Slurm and creating some simple functions and graphs:<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2422\" src=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave2-265x300.jpg\" alt=\"octave2\" width=\"265\" height=\"300\" srcset=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave2-265x300.jpg 265w, https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave2.jpg 572w\" sizes=\"(max-width: 265px) 100vw, 265px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Note: Octave is highly sensitive to the compiler selection that it was installed with. On Hex we used gcc-4.9.2 as the native gcc version is not compliant with several Octave packages. To use octave do the following:<\/p>\n<pre>\r\nmodule add compilers\/gcc492 software\/octave-4.0.0\r\nqsub -I -V\r\noctave\r\n<\/pre>\n<p>To install packages run Octave and add the packages directly from SourceForge to your local folder. For example to load the image package:<\/p>\n<pre>\r\npkg install -verbose -local -forge image\r\npkg load image\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We have installed GNU Octave\u00a0on our clusters. From their website: &#8220;GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,4,8],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Octave - UCT HPC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Octave - UCT HPC\" \/>\n<meta property=\"og:description\" content=\"We have installed GNU Octave\u00a0on our clusters. From their website: &#8220;GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\" \/>\n<meta property=\"og:site_name\" content=\"UCT HPC\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-04T08:55:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-09-15T14:31:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1-300x140.jpg\" \/>\n<meta name=\"author\" content=\"Andrew Lewis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Lewis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\"},\"author\":{\"name\":\"Andrew Lewis\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e\"},\"headline\":\"Octave\",\"datePublished\":\"2015-09-04T08:55:07+00:00\",\"dateModified\":\"2015-09-15T14:31:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\"},\"wordCount\":295,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\"},\"articleSection\":[\"application\",\"hpc\",\"programming\"],\"inLanguage\":\"en-ZA\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\",\"name\":\"Octave - UCT HPC\",\"isPartOf\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#website\"},\"datePublished\":\"2015-09-04T08:55:07+00:00\",\"dateModified\":\"2015-09-15T14:31:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#breadcrumb\"},\"inLanguage\":\"en-ZA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ucthpc.uct.ac.za\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Octave\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#website\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/\",\"name\":\"UCT HPC\",\"description\":\"University of Cape Town High Performance Computing\",\"publisher\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ucthpc.uct.ac.za\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-ZA\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\",\"name\":\"University of Cape Town High Performance Computing\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-ZA\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png\",\"contentUrl\":\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png\",\"width\":450,\"height\":423,\"caption\":\"University of Cape Town High Performance Computing\"},\"image\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e\",\"name\":\"Andrew Lewis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-ZA\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g\",\"caption\":\"Andrew Lewis\"},\"sameAs\":[\"http:\/\/blogs.uct.ac.za\/blog\/big-bytes\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Octave - UCT HPC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/","og_locale":"en_US","og_type":"article","og_title":"Octave - UCT HPC","og_description":"We have installed GNU Octave\u00a0on our clusters. From their website: &#8220;GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used...","og_url":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/","og_site_name":"UCT HPC","article_published_time":"2015-09-04T08:55:07+00:00","article_modified_time":"2015-09-15T14:31:05+00:00","og_image":[{"url":"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/octave1-300x140.jpg"}],"author":"Andrew Lewis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Lewis","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#article","isPartOf":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/"},"author":{"name":"Andrew Lewis","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e"},"headline":"Octave","datePublished":"2015-09-04T08:55:07+00:00","dateModified":"2015-09-15T14:31:05+00:00","mainEntityOfPage":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/"},"wordCount":295,"commentCount":0,"publisher":{"@id":"https:\/\/ucthpc.uct.ac.za\/#organization"},"articleSection":["application","hpc","programming"],"inLanguage":"en-ZA","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/","url":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/","name":"Octave - UCT HPC","isPartOf":{"@id":"https:\/\/ucthpc.uct.ac.za\/#website"},"datePublished":"2015-09-04T08:55:07+00:00","dateModified":"2015-09-15T14:31:05+00:00","breadcrumb":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#breadcrumb"},"inLanguage":"en-ZA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2015\/09\/04\/octave\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ucthpc.uct.ac.za\/"},{"@type":"ListItem","position":2,"name":"Octave"}]},{"@type":"WebSite","@id":"https:\/\/ucthpc.uct.ac.za\/#website","url":"https:\/\/ucthpc.uct.ac.za\/","name":"UCT HPC","description":"University of Cape Town High Performance Computing","publisher":{"@id":"https:\/\/ucthpc.uct.ac.za\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ucthpc.uct.ac.za\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-ZA"},{"@type":"Organization","@id":"https:\/\/ucthpc.uct.ac.za\/#organization","name":"University of Cape Town High Performance Computing","url":"https:\/\/ucthpc.uct.ac.za\/","logo":{"@type":"ImageObject","inLanguage":"en-ZA","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/","url":"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png","contentUrl":"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png","width":450,"height":423,"caption":"University of Cape Town High Performance Computing"},"image":{"@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e","name":"Andrew Lewis","image":{"@type":"ImageObject","inLanguage":"en-ZA","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g","caption":"Andrew Lewis"},"sameAs":["http:\/\/blogs.uct.ac.za\/blog\/big-bytes"]}]}},"_links":{"self":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2423"}],"collection":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/comments?post=2423"}],"version-history":[{"count":9,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2423\/revisions"}],"predecessor-version":[{"id":2528,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2423\/revisions\/2528"}],"wp:attachment":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/media?parent=2423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/categories?post=2423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/tags?post=2423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}