Notes for talk at LCI 2017 at UWYO

* What is Lmod?

* Features
** Reads TCL and Lua modulefiles
** One name rule 
** Supports a Software Hierarchy
** Fast module avail via spider cache.
** Properties (gpu, mic, beta, etc)
** Semantic Versioning:  5.6 is older than 5.10
** family(``compiler'') family(``mpi'') support
** Optional module usage tracking available
** Collections
** tab completion for Bash and Zsh
** Many other features: ml, hooks, pushenv, sticky modules, ...


* Talk about the Hierarchy and show an example
* Talk about bash and interactive shells
* Talk about Shell Startup Debug
* Creating Modulefiles
   Modulefiles are written for the steps that will load a module.
   Conventions Matter.  Be consistent.

       Something like:  <SITE_NAME>_<PKG_NAME>_{LIB,INC,BIN}

       TACC_HDF5_INC
       TACC_HDF5_LIB
       TACC_HDF5_BIN

   Modulefiles should almost always prepend_path not append_path for
   PATH like variables.

* What to call your modules:

   I like easy typing so I like short names like boost/1.61 and lower
   case. Other site try to match the "name" like OpenMPI/11.0 (ugh!)

   Other sites like category/name/version. I think it depends how
   developer friendly versus documentation your site is.  Pick one.
   My only comment is that your choice of categories might be
   different than mine.

* What goes in /etc/profile.d/*.{sh,csh} files versus modulefiles?

  In my view it should always safe to do "module purge" and have a
  sane environment. 
** /etc/profile.d/*.{sh,csh}
   default prompt (PS1)
   $WORK, $SCRATCH
** TACC module:
   a default compiler, a default MPI stack
   append_path("PATH",".") for all non-root accounts

* Sticky modules?
  Should you use them? Maybe 

* Initial set of modules:
 
  We have a module named "TACC" which all users get loaded by
  default.  It has a default compiler and MPI stack module loaded.

  We set LMOD_SYSTEM_DEFAULT_MODULES="TACC"

  Other sites might do:

     LMOD_SYSTEM_DEFAULT_MODULES="intel:impi"

  either way the default module load does:

    module --initial_load --no_redirect restore

  which will load the user's default collection (if it exists) or the
  default modules:

  For us:  "module reset" is the same as "module purge; module load TACC"  
  


   
* What are the  difference between Lmod and Tmod?

* What is new with Lmod 7?
** Support for Name-Version-Version
** Support for hidden modules
** Support for Translations

* NVV

* Marking Defaults for sites and users with MODULERC

* Hidden Modules

* Why does Lmod work at all?

* Why is this important?
** It is a very useful trick to know.
** Debugging modulefiles:
** $ $LMOD_CMD bash load <module> 2> /dev/null > stdout.txt

* Debugging the internal behavior of Lmod
** module --config  => report Lmod configuation
** module -D load foo 2> load.log

* Site customization
** SitePackage.lua and Hooks
** Can place common site functions for local modulefiles
** Hooks allow sites to change Lmod behavior
** E.G. tracking module usage via the load hook.

** Contrib directory
* Conclusions: Lmod 7+
** Latest version: https://github.com:TACC/Lmod.git
** Stable version: http://lmod.sf.net
** Documentation:  http://lmod.readthedocs.org
** Mailing list:   Go to https://lists.sourceforge.net/lists/listinfo/lmod-users to join.

* Talk with Doug and Bill:
   Lmod works well with the modules and has lots of feature.
   It works well with the hierarchy but Lmod doesn't require it.
   
