{"id":535,"date":"2020-05-13T10:18:23","date_gmt":"2020-05-13T08:18:23","guid":{"rendered":"http:\/\/calculs.univ-cotedazur.fr\/?page_id=535"},"modified":"2026-03-18T10:56:33","modified_gmt":"2026-03-18T09:56:33","slug":"how-to-use-modules","status":"publish","type":"page","link":"https:\/\/calculs.univ-cotedazur.fr\/?page_id=535&lang=en","title":{"rendered":"How to use modules"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-grey\">\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=535&amp;lang=en#General_information\" title=\"General information\">General information<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=535&amp;lang=en#How_to_load_a_module\" title=\"How to load a module\">How to load a module<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=535&amp;lang=en#How_to_unload_a_module\" title=\"How to unload a module\">How to unload a module<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=535&amp;lang=en#How_to_find_a_software_installation_path\" title=\"How to find a software installation path\">How to find a software installation path<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"General_information\"><\/span>General information<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>The modules allow you to dynamically modify the environment variables needed to run your code (essentially PATH, LD_LIBRARY_PATH or even MAN_PATH), depending on the module you are loading.<\/p>\n\n\n\n<p>They are in the form <strong>&lt;software name&gt;\/&lt;version&gt;<\/strong> <\/p>\n\n\n\n<p>The complete list of cluster modules can be displayed with the command:<\/p>\n\n\n\n<pre>module spider<\/pre>\n\n\n\n<p>The modules are organized hierarchically, in the form of dependencies. For example, to use PnetCDF you must first load an MPI implementation. The modules that you can load immediately are those displayed with:<\/p>\n\n\n\n<pre>module av<\/pre>\n\n\n\n<p>We are trying to create modules for you that already include dependencies. Nevertheless, to load the desired module, it is sometimes necessary to first have loaded one (or more) module (s) on which the desired module depends. To find out what these modules are, type the command:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">module spider &lt;desired module&gt;<\/pre>\n\n\n\n<p>To consult the list of modules installed on the cluster, <a href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=545&amp;lang=en\">you can also click here.<\/a><\/p>\n\n\n\n<p>To obtain more details about a module (which version of compiler, which environment variables are created when loading the module), call this command. Please note that you should load the module&rsquo;s dependencies before using the <em>help <\/em>command. <\/p>\n\n\n\n<pre class=\"wp-block-verse\">module help &lt;module name&gt;<\/pre>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"How_to_load_a_module\"><\/span>How to load a module<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To load a module, use the command:<\/p>\n\n\n\n<pre>module load &lt;module name&gt;<\/pre>\n\n\n\n<p>Please note that software may have several versions installed, so it will have a module for each version. Among these modules, there is one that will be loaded by default if you do not specify the version number. So be sure to include the version number in the module name, otherwise you may not be loading the correct module.<\/p>\n\n\n\n<p>To view which modules are currently loaded:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">module list<\/pre>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"How_to_unload_a_module\"><\/span>How to unload a module<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To unload a module:<\/p>\n\n\n\n<pre>module unload &lt;module name&gt;<\/pre>\n\n\n\n<p>  To unload your entire list of loaded modules, use:   <\/p>\n\n\n\n<pre>module purge<\/pre>\n\n\n\n<p>It is for example recommended to use this command at the start of a batch, before loading your modules.<\/p>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"How_to_find_a_software_installation_path\"><\/span>How to find a software installation path<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>If you load a module and you need to know the path for the associated librairies, includes or executables, you can display the following environment variables, once you have loaded your modules:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">echo $INCLUDE\necho $LIBRARY_PATH\necho $LD_LIBRARY_PATH\necho $PATH\n<\/pre>\n\n\n\n<p>You can also use the <em>which <\/em>command, which displays the installation path for the executables. For example:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">module load gnu15\/15.1.0\nwhich gcc<\/pre>\n\n\n\n<p>returns <strong>\/opt\/ohpc\/pub\/compiler\/gcc\/15.1.0\/bin\/gcc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>General information The modules allow you to dynamically modify the environment variables needed to run your code (essentially PATH, LD_LIBRARY_PATH or even MAN_PATH), depending on the module you are loading. They are in the form &lt;software name&gt;\/&lt;version&gt; The complete list &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":538,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/535"}],"collection":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=535"}],"version-history":[{"count":9,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/535\/revisions"}],"predecessor-version":[{"id":3313,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/535\/revisions\/3313"}],"up":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/538"}],"wp:attachment":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}