Environment Modules (software): Difference between revisions

Content deleted Content added
No edit summary
Add category
Line 7:
| latest_release_date = {{Start date and age|2024|11|11}}
| operating_system = [[Unix-like]]
| programming_language = [[Tcl]]
| license = [[GNU General Public License#Version 2]]
| website = {{URL|https://modules.sourceforge.net/}}
Line 47 ⟶ 48:
The default {{Mono|modulefiles}} directory is empty initially. Copy the null module to the default modulefiles directory to have it shown by "module avail". The following uses the null and module-info modules to show use of a version file within a hierarchical organization and their effect on module avail and module show:
<syntaxhighlight lang="bash">
mkdir /etc/modulefiles/test
cp ${MODULESHOME}/modulefiles/null /etc/modulefiles/test/2.0
cp ${MODULESHOME}/modulefiles/module-info /etc/modulefiles/test/1.0
module avail
module show test
</syntaxhighlight>
 
Set the first version as the default:
<syntaxhighlight lang="bash">
echo '#%Module' > /etc/modulefiles/test/.version
echo 'set ModulesVersion "1.0"' >> /etc/modulefiles/test/.version
module avail
module show test
module show test/2.0
</syntaxhighlight>
 
Switch to the newer version as the default with:
<syntaxhighlight lang="bash">
rm /etc/modulefiles/test/.version
echo '#%Module' > /etc/modulefiles/test/.version
echo 'set ModulesVersion "2.0"' >> /etc/modulefiles/test/.version
module avail
module show test
</syntaxhighlight>
 
Line 242 ⟶ 243:
* [https://spack.io/ Spack] ― Package Manager for HPC Software developed at [[Lawrence Livermore National Laboratory]]
 
[[Category:Free software programmed in Tcl]]
[[Category:Unix software]]