Modules: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
(Refactoring this page)
(clarify and shorten)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
In the context of computer software, a ''module'' is a way for a user to access the functionality of a particular piece of software. That being defined, this page briefly describes a few types of software modules and cites their corresponding documentation pages.


== ''Module'' Disambiguation ==
In computing, a module is a unit of software that is designed to be independent, interchangeable, and contain everything necessary to provide some desired functionality.
<ref>[https://en.wikipedia.org/wiki/Modular_programming Wikipedia, "Modular programming"]</ref>
The term "module" may sometimes have a more specific meaning depending on context.
This page describes a few types of modules and cites their corresponding documentation pages.


=== Lmod Modules ===
== Disambiguation ==
Lmod modules are used to alter a user's (shell) environment, in a way that is relatively easy to manage, both for the user and for the person that has installed the software in question. A complete introduction to ''modules'' and ''module files'' is presented in the [[Using modules]] page.


Note: it is also possible for users to [[Utiliser_des_modules/en#Creating_modules|create their own modules]].
=== Lmod modules ===


=== Python Modules ===
Also called "environment modules", Lmod modules are used to alter your (shell) environment so as to enable you to use a particular software package,
Python modules are imported in Python scripts in order to import additional classes and functions to these Python scripts. Users can install Python modules in a [[Python#Creating_and_using_a_virtual_environment|Python virtual environment]] from a collection of [[Python#Available_wheels|available Python wheels]], which are precompiled modules compatible with the [[Standard software environments]].
or to use a non-default version of certain common software packages such as compilers.  See [[Using modules]].


Otherwise, users can use a <code>python</code> Lmod module along with a <code>scipy-stack</code> Lmod module in order to run their Python scripts. Note: the [[Python#SciPy_stack|SciPy stack]] is only a small collection of preinstalled scientific Python modules.
=== Python modules ===
 
In Python, a module is file of code (usually Python code) which can be loaded with the <code>import ...</code> or <code>from ... import ...</code> statements to provide functionality.  A Python package is a collection of Python modules; the terms "package" and "module" are frequently interchanged in casual use.
<ref>[https://www.tutorialspoint.com/What-is-the-difference-between-a-python-module-and-a-python-package Tutorialspoint.com, "What is the difference between a python module and a python package?"]</ref>
 
Certain frequently-used Python modules such as "Numpy" can be imported if you first load the <code>scipy-stack</code> Lmod module at the shell level.
See [[Python#SciPy_stack|SciPy stack]] for details.
 
Compute Canada maintains a large collection of [[Python#Available_wheels|Python "wheels"]].
These are modules which are pre-compiled to be compatible with the [[Standard software environments]].
Before importing modules from the Compute Canada wheels, you should create a [[Python#Creating_and_using_a_virtual_environment|virtual environment]]. 
 
Python modules which are in neither the <code>scipy-stack</code> Lmod module or our wheels collection can be installed from the internet
as described at [[Installing packages|Python#Installing_packages]].
 
== Other related topics ==


== Other ''Module'' Related Topics ==
The main [[Available software]] page is a good starting point. Other related pages:
The main [[Available software]] page is a good starting point. Other related pages:
* [[Standard software environments]]: as of April 1st, 2021, <code>StdEnv/2020</code> is the default collection of Lmod modules
* [[Standard software environments]]: as of April 1st, 2021, <code>StdEnv/2020</code> is the default collection of Lmod modules
* [[Modules specific to Niagara]]
* Lmod [[modules specific to Niagara]]
* Tables of modules optimized for [[Modules avx|AVX]], '''[[Modules avx2|AVX2]]''' and '''[[Modules avx512|AVX512]]''' [[Standard_software_environments#Performance_improvements|CPU instructions]]
* Tables of Lmod modules optimized for [[Modules avx|AVX]], '''[[Modules avx2|AVX2]]''' and '''[[Modules avx512|AVX512]]''' [[Standard_software_environments#Performance_improvements|CPU instructions]]
* [[:Category:Software|Category ''Software'']]: a list of different software pages in this wiki, including commercial or licensed software
* [[:Category:Software|Category ''Software'']]: a list of different software pages in this wiki, including commercial or licensed software
== Footnotes ==
</translate>
</translate>

Revision as of 20:05, 24 June 2021

Other languages:

In computing, a module is a unit of software that is designed to be independent, interchangeable, and contain everything necessary to provide some desired functionality. [1] The term "module" may sometimes have a more specific meaning depending on context. This page describes a few types of modules and cites their corresponding documentation pages.

Disambiguation

Lmod modules

Also called "environment modules", Lmod modules are used to alter your (shell) environment so as to enable you to use a particular software package, or to use a non-default version of certain common software packages such as compilers. See Using modules.

Python modules

In Python, a module is file of code (usually Python code) which can be loaded with the import ... or from ... import ... statements to provide functionality. A Python package is a collection of Python modules; the terms "package" and "module" are frequently interchanged in casual use. [2]

Certain frequently-used Python modules such as "Numpy" can be imported if you first load the scipy-stack Lmod module at the shell level. See SciPy stack for details.

Compute Canada maintains a large collection of Python "wheels". These are modules which are pre-compiled to be compatible with the Standard software environments. Before importing modules from the Compute Canada wheels, you should create a virtual environment.

Python modules which are in neither the scipy-stack Lmod module or our wheels collection can be installed from the internet as described at Python#Installing_packages.

Other related topics

The main Available software page is a good starting point. Other related pages:

Footnotes