Environment Modules (software): Difference between revisions

Content deleted Content added
No edit summary
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 49:
 
The default 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:
<sourcesyntaxhighlight lang="bash">
mkdir /etc/modulefiles/test
cp ${MODULESHOME}/modulefiles/null /etc/modulefiles/test/2.0
Line 55:
module avail
module show test
</syntaxhighlight>
</source>
Set the first version as the default:
<sourcesyntaxhighlight lang="bash">
echo '#%Module' > /etc/modulefiles/test/.version
echo 'set ModulesVersion "1.0"' >> /etc/modulefiles/test/.version
Line 63:
module show test
module show test/2.0
</syntaxhighlight>
</source>
Switch to the newer version as the default with:
<sourcesyntaxhighlight lang="bash">
rm /etc/modulefiles/test/.version
echo '#%Module' > /etc/modulefiles/test/.version
Line 71:
module avail
module show test
</syntaxhighlight>
</source>
After the above following a fresh install from source you would see:
<sourcesyntaxhighlight lang="console">
$ module avail
 
Line 120:
+++++++++++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------
</syntaxhighlight>
</source>
 
== Automatic modules initialization ==
Line 131:
 
{{mono|/etc/profile.d/modules.sh}} from the {{mono|etc/global/profile.modules}} file in the 3.2.10 modules build directory.
<sourcesyntaxhighlight lang="bash">
trap "" 1 2 3
Line 142:
trap 1 2 3
</syntaxhighlight>
</source>
Copy the {{mono|etc/global/profile.modules}} file from the 3.2.10 modules build directory to the system initialization directory: