\documentclass{beamer}

\usetheme[headernav]{TACC} %%Drop the 'headernav' if you don't like
                           %%the stuff at the top of your slide

\usepackage{amsmath,amssymb,amsthm}
\usepackage{alltt}
\usepackage{graphicx}

\title{Lmod: A Modern Replacement for Environment Modules}


\author{Robert McLay}
\institute{The Texas Advanced Computing Center}

\date{February 8, 2017}  %% Use this if you want to fix the date in
                          %% stone rather than use \today

\newcommand{\bfnabla}{\mbox{\boldmath$\nabla$}}
\newcommand{\laplacian}[1]{\bfnabla^2 #1}
\newcommand{\grad}[1]{\bfnabla #1}
\newcommand{\tgrad}[1]{\bfnabla^T #1}
\newcommand{\dvg}[1]{\bfnabla \cdot #1}
\newcommand{\curl}[1]{\bfnabla \times #1}
\newcommand{\lap}[1]{\bfnabla^2 #1}

\begin{document}

% page 1
\begin{frame}
  \titlepage
\end{frame}

\section{Introduction}

% page 2
\begin{frame}{Introduction}
  \begin{itemize}
    \item What is Lmod?
    \item Why you might to use it?
    \item What's the difference between Tmod and Lmod
    \item What is new with Lmod?
    \item How could Lmod possibly work?
    \item Conclusions
  \end{itemize}
\end{frame}

% page 3
\begin{frame}{What is Lmod?}
  \begin{itemize}
    \item A modern replacement for a tried and true concept.
    \item The guiding principal: ``Make life easier w/o getting in
      the way.''
    \item Sites use Modules to communicate w/ Users.
  \end{itemize}
\end{frame}

% page 4
\begin{frame}{Why You Might Want To Use Lmod?}
  \begin{itemize}
    \item Same \texttt{module} command as in Tmod
    \item Active Development;  Frequent Releases; Bug fixes.
    \item Vibrant Community
    \item It is used from Norway to Isreal to New Zealand from Stanford to MIT to NASA
    \item Enjoy many capabilities w/o changing a single module file
    \item Debian, Fedora and Brew packages available
    \item Many more advantages when you're ready
    \item It is what we and many sites around the world use every day!
  \end{itemize}
\end{frame}

% page 5
\begin{frame}{Features}
  \begin{itemize}
    \item Reads for TCL and Lua modulefiles
    \item One name rule.
    \item Support a Software Hierarchy
    \item Fast \texttt{module avail} via optional spider cache 
    \item Properties (gpu, mic)
    \item Semantic Versioning:  5.6 is older than 5.10
    \item family(``compiler'') family(``mpi'') support
    \item Optional Tracking: What modules are used?
    \item Many other features: ml, collections, hooks, nag, ...
  \end{itemize}
\end{frame}

% page 6
\begin{frame}{Tmod vs. Lmod}
  \begin{itemize}
    \item Tmod is in maintenance mode, Lmod active
    \item Lmod has many more features
    \item Tmod: \texttt{module load gcc/5.3 gcc/6.0} works
    \item Lmod has the ``One Name Rule``
    \item Lmod close to Tmod, but not the same.
  \end{itemize}
\end{frame}

% page 7
\begin{frame}{What is new with Lmod 7?}
  \begin{itemize}
    \item Support for Name-Version-Version
    \item Support for Hidden Modules
    \item Support for Translations
  \end{itemize}
\end{frame}

\begin{frame}{History of Support for Module Names}
  \begin{itemize}
    \item Originally only \emph{name/version}:  gcc/4.8.1
    \item Lmod 5+ \emph{cat/name/version}:  compiler/gcc/4.8.1
  \end{itemize}
\end{frame}

\begin{frame}{New with Lmod 7: NVV}
  \begin{itemize}
    \item Support for \emph{name/v1/v2}:  fftw/64/3.3.4
    \item MODULERC Support:
      \begin{itemize}
        \item Set Defaults under Site and/or User
        \item Hide any installed module
      \end{itemize}
    \item Major refactoring of Lmod 
      \begin{itemize}
        \item support NVV
        \item Code Cleanup
        \item Better Spider Cache handling
      \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Setting Defaults}
  \begin{itemize}
    \item System MODULERC file: \texttt{/path/to/lmod/etc/rc}
    \item \texttt{\$MODULERC} points to a file.
    \item User \texttt{\textasciitilde/.modulerc}
    \item Can set defaults User, System, Files
    \item Examples: account for web services
  \end{itemize}
\end{frame}

\begin{frame}{Hiding Modules}
  \begin{itemize}
    \item System MODULERC file: \texttt{/path/to/lmod/etc/rc}
    \item User \texttt{\textasciitilde/.modulerc}
    \item \texttt{\color{blue}hide-version foo/1.2.3}
    \item Hidden from avail, spider and keyword
    \item Hidden modules can be loaded
    \item Sites: deprecation, experimental
    \item show hidden: \texttt{module --show-hidden avail}
    \item Hidden modules are marked and displayed dim
  \end{itemize}
\end{frame}


\begin{frame}{Translations}
  \begin{itemize}
    \item Lmod has moved all messages into messageDir/en.lua
    \item Language files are available: fr, de, es, zh
    \item Sites can override particular messages, with en as default.
  \end{itemize}
\end{frame}


\begin{frame}{Why does Lmod work at all?}
  \begin{itemize}
    \item The Environment is inherited from the parent process
    \item Changes in the child's environment DOES NOT affect the
      parent's
    \item So how could Lmod work at all? 
  \end{itemize}
\end{frame}

\begin{frame}{The trick is}
  \begin{itemize}
    \item The \texttt{lmod} program generates text.
    \item The module command eval's that text.
  \end{itemize}
\end{frame}

\begin{frame}{Why is this important?}
  \begin{itemize}
    \item It's a useful trick to know
    \item Debugging Modulefiles:
    \item \texttt{\$LMOD\_CMD bash load} \emph{module} \texttt{2$>$
        /dev/null $>$ stdout.txt}
  \end{itemize}
\end{frame}

\begin{frame}{Debugging Lmod}
  \begin{itemize}
    \item \texttt{module --config} : reports Lmod configuration
    \item \texttt{module -D load foo $>$ load.log}
  \end{itemize}
\end{frame}

\begin{frame}{Future Work}
  \begin{itemize}
    \item Support for the Break statement
    \item A spider like command to syntax check modulefiles
    \item Looking at influxdb to better handle the usage tracking.
  \end{itemize}
\end{frame}

\begin{frame}{Conclusions: Lmod 7+}
  \begin{itemize}
    \item Latest version: https://github.com:TACC/Lmod.git
    \item Stable version: http://lmod.sf.net
    \item Documentation:  http://lmod.readthedocs.org
  \end{itemize}
\end{frame}


\end{document}
