Modular Environment =================== On PSMN, we use `Lua Environment Modules (lmod) `_. There is **no default** pre-loaded environment, because everything is separate by cluster/partition (See :doc:`../clusters_usage/partitions_overview`). See :doc:`../modules_list` for a list of all available modules, by cluster/partition. .. important:: It is a **3 steps process**: - Initialize, - choose a list of modules (ie choose a cluster/partition), - load one or many modules. **At first, you need to initialize:** .. code-block:: bash # into ~/.profile source /usr/share/lmod/lmod/init/bash **Then use one modules list within a partition:** .. code-block:: bash # for E5 partition module use /applis/PSMN/debian11/E5/modules/all # for Cascade partition module use /applis/PSMN/debian11/Cascade/modules/all Show available modules: .. code-block:: bash module avail What is / help / show on a module (ex: foss/2021a): .. code-block:: bash module whatis foss/2021a module help foss/2021a module show foss/2021a **Load a module (ex: foss/2021a):** .. code-block:: bash module load foss/2021a List loaded modules: .. code-block:: bash module list Unload a module: .. code-block:: bash module unload foss/2021a Unload any loaded modules: .. code-block:: bash module purge Change from one cluster/partition to another (ex: E5 -> Cascade): .. code-block:: bash # modules for E5 partition where previously choosen module unuse /applis/PSMN/debian11/E5/modules/all module use /applis/PSMN/debian11/Cascade/modules/all .. important:: You cannot have two list of modules from different cluster/partition loaded at the same time. ``lmod`` will choose either one, and it will not be the right one. If you do so, best of luck. In a script: .. code-block:: bash # init source /usr/share/lmod/lmod/init/bash # for E5 partition module use /applis/PSMN/debian11/E5/modules/all # for Lake partition #module use /applis/PSMN/debian11/Lake/modules/all module load foss/2021a See :doc:`../modules_list` for a list of all available modules.