Environment Modules Using Lmod

Module Usage for the Admin

In an article from a couple of years ago, I presented a way to gather logs about Tcl/C environment module usage. It was a bit of kludge, but it did allow me to gather data. With Lmod, this ability was brought to the forefront.

Tracking module usage is conceptually fairly easy, but a number of steps are involved. Having this information can be amazingly important, because it allows you to track which tools are used the most. (I associate one tool with one module.) If you have various versions of a specific tool, it allows you to track the usage of each, so you can either deprecate an older version or justify keeping it around and maintaining it. You can also see which modules are used as a function of time, which helps you understand when people run their jobs and what modules they use.

Summary

Although I have written about Lmod before, I continue to come back to it because it is so useful. It greatly helps users sort out their environment so they do not accidentally load conflicting libraries and tools. The first time you have to debug a user’s code when they have mixed MPI implementations, you will be thankful for Lmod.

Environment modules in general, and Lmod specifically, allow you to keep multiple versions of the same package on a system to service applications that have been built with older versions of a compiler, MPI, or library, or even old libraries that are needed. I even saw a somewhat recent posting to the Open MPI mailing list asking about LAM-MPI, even though it basically has been dead for a decade. You would be surprised how long applications stick around and bring their dependencies with them.

Because Lmod can read Tcl/C module files in addition to Lua (the preferred language), you can move easily from Tcl/C Environment Modules to Lmod. As you can see from the Lua module file examples here, the syntax is very clean and simple, making them very easy to read.

Finally, Lmod is developing tools that allow you to collect module usage and put it into a database that you can mine – which is very cool stuff, indeed.