{"id":325,"date":"2022-07-06T13:30:42","date_gmt":"2022-07-06T17:30:42","guid":{"rendered":"http:\/\/localhost:8080\/?p=325"},"modified":"2024-04-16T09:53:48","modified_gmt":"2024-04-16T13:53:48","slug":"buildinginstalling-software","status":"publish","type":"post","link":"https:\/\/knowledgebasev.kinsta.cloud\/?p=325","title":{"rendered":"Compiling and Installing your own Software"},"content":{"rendered":"<div class=\"st-alert st-alert- \">Code must be compiled on a compute node. Compilers are not available on the login server.<\/div>\n<p>We recommend contacting <a title=\"Customer Support\" href=\"\/?page_id=115\">Sabalcore Support<\/a> for building and installing Software. However, you can also build and install software yourself. This section describes various was of installing software.<\/p>\n<p>There are four common methods for building\/installing software in your Sabalcore account. The most\u00a0basic method is to manually compile your code using a compiler directly. You can also use the &#8220;make&#8221; command along\u00a0with a Makefile, which describes how to build your software, to compile source codes. Many open-source software packages provide\u00a0a configure script which creates a Makefile and other configuration files required to build the\u00a0package.\u00a0Finally, you may wish to install a package which has been distributed as an RPM. Generally,\u00a0these packages should be installed by <a title=\"Customer Support\" href=\"\/?page_id=115\">Sabalcore Support<\/a>, but in some cases you may\u00a0install them yourself.<\/p>\n<h4>Compiling Code &#8211; Start an interactive session and load required modules<\/h4>\n<p>Review how to invoke an <a title=\"5) Running Jobs\" href=\"\/?p=223\">interactive session<\/a>. Start an interactive session requesting at least one core on the node of your choice. For example<\/p>\n<pre>qsub -I -l nodes=1:red:ppn=4<\/pre>\n<p>Then use the \u201cmodule avail\u201d command to see which compilers and libraries are available. We have\u00a0 GNU and Intel compilers available. Use the<\/p>\n<pre>module avail\u00a0gcc<\/pre>\n<p>or<\/p>\n<pre>module avail intel<\/pre>\n<p>command to see what is\u00a0available After starting the interactive session, use the \u201cmodule\u00a0load &lt;COMPILER&gt;\u201d command to load a specific compiler. Note that &lt;COMPILER&gt; should be the\u00a0name\/version of the compiler you would like to use, e.g. \u201cgcc\/10.2.0\u201d.<\/p>\n<pre>module load\u00a0gcc\/10.2.0<\/pre>\n<pre>module list<\/pre>\n<p>will list the modules loaded in your environment.<\/p>\n<p>There are many other modules and libs available such as fftw, gnuplot, ect. Load all that you require. If a lib is missing, contact support for installation.<\/p>\n<p>After you have loaded all required modules, you\u00a0can use the compiler directly from the command-line. \u00a0If you need help compiling your code, please contact <a title=\"Customer Support\" href=\"\/?page_id=115\">Support<\/a>.<\/p>\n<h4>Building Software with MPI and InfinBand<\/h4>\n<p>If you need to compile your own parallel software, you should use either OpenMPI or\u00a0mpich as your MPI library when building your application.\u00a0<em>OpenMPI is the\u00a0recommended\u00a0MPI library at Sabalcore.<\/em>\u00a0Both are already installed and configured to work well on our HPC systems. Simply load either the &#8216;openmpi&#8217; or &#8216;mpich&#8217; module before configuring\/building your software. When you load the module, all the correct paths and environment variables will be set. If you need to manually edit a Makefile or supply configuration options for MPI, you can use &#8216;module show openmpi&#8217; or &#8216;module show mpich&#8217; to find where the MPI libraries are installed. See\u00a0<a title=\"Selecting Software Packages\" href=\"\/?p=252\">Modules<\/a>\u00a0for more information.\u00a0It is not recommended to build your own MPI library. If, for whatever reason, you need to build your own MPI library, please contact support@sabalcore.com for additional assistance.<\/p>\n<h4>Commercial Compilers<\/h4>\n<p>The Intel v2020 and Oneapi compilers are available system-wide. To invoke the compiler, follow the same instructions as above but you must load the Intel module, specifically:<\/p>\n<pre>module load intel\/2020\/2020.0.166<\/pre>\n<p>or for the most current version<\/p>\n<pre>module load intel<\/pre>\n<p>Not every commercial compiler is available directly to users. Some compilers including\u00a0<a title=\"Portland Group\" href=\"http:\/\/www.pgroup.com\/\" target=\"_blank\"><strong>PGI<\/strong><\/a>\u00a0and new versions of\u00a0<a title=\"Intel compilers\" href=\"http:\/\/software.intel.com\/en-us\/intel-composer-xe\" target=\"_blank\"><strong>Intel<\/strong><\/a>\u00a0are available\u00a0 through\u00a0<a title=\"Customer Support\" href=\"\/?page_id=115\">Sabalcore Support<\/a>. Contact\u00a0<a title=\"Customer Support\" href=\"\/?page_id=115\">Support<\/a>\u00a0and include the details of the compilation (location of source, compiler needed, and options). We will then contact you for further instructions.<\/p>\n<h4>Using a Makefile or configure script<\/h4>\n<p><span style=\"line-height: 13px;\"><span style=\"color: #993300;\">Makefile<\/span> &#8211;\u00a0<\/span>If you already have a Makefile for you source code, then building it is very simple. Just make sure that you load the compiler module and that your Makefile uses one of the available compilers (GNU) then enter &#8216;make&#8217;.<\/p>\n<p><span style=\"color: #993300;\">&#8220;configure&#8221; script<\/span> &#8211; Run the &#8220;.\/configure&#8221; command as you normally would but use the <strong>&#8211;prefix=$HOME<\/strong> option to ensure the package will be installed in <span style=\"color: #000000;\">your<\/span> home directory. After configuring, typically you would run the \u201cmake\u201d, \u201cmake test\u201d, and \u201cmake install\u201d commands to complete the installation.<\/p>\n<h4><span style=\"font-size: 1em;\">Installing Software<\/span><\/h4>\n<h4>Using an RPM Package<\/h4>\n<p>You may want to install a software package from an RPM file into your home-directory. It is recommended that you request such a package to be installed system-wide by contacting <a title=\"Customer Support\" href=\"\/?page_id=115\">Support<\/a> . However, in some cases, it is possible to install such packages directly in your home-directory. You will have to use at a minimum the &#8211;prefix option to rpm to force the installation to occur in your home-directory. You may also need to use the &#8211;relocate option. Please refer to \u201cman rpm\u201d for more details. As always, please contact <a title=\"Customer Support\" href=\"\/?page_id=115\">Support<\/a> \u00a0if you require any help.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recommend contacting Sabalcore Support for building and installing Software. However, you can also build and install software yourself. This section describes various was of installing software. There are four common methods for building\/installing software in your Sabalcore account. The most\u00a0basic method is to manually compile your code using a compiler directly. You can also [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[73,66,67,125,70,68,69,71,72],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-userguideadvanced","tag-c","tag-compile","tag-compiler","tag-compiling","tag-fortran","tag-gcc","tag-gfortran","tag-intel","tag-pgi"],"_links":{"self":[{"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325"}],"version-history":[{"count":23,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":2011,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions\/2011"}],"wp:attachment":[{"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/knowledgebasev.kinsta.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}