\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 BoF at SC'13}


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

\date{November 20, 2012}  %% 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}

\begin{frame}
  \titlepage
\end{frame}

\section{Introduction}

\begin{frame}{Lmod's Big Ideas}
  \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.''
  \end{itemize}
\end{frame}


\begin{frame}{Modern Replacement}
  \begin{itemize}
    \item Active Development.
    \item Vibrant Community.
    \item Robust Regression Testing.
    \item Great control over defaults, versions and dependencies.
    \item Work great w/ or w/o a software hierarchy.
  \end{itemize}
\end{frame}

\begin{frame}{Making life easier}
  \begin{itemize}
    \item You want to save an empty collection, Lmod will let you but
      with warning.
    \item You want multiple compilers, you can if you are an expert.
  \end{itemize}
\end{frame}

\section{Recent Developments}

\begin{frame}{New Features}
  \begin{itemize}
    \item Meta-modules can be saved even when they include \texttt{setenv}
      and \texttt{prepend\_path} commands (Thx to Maxime Boissonneault)
    \item Module properties.
    \item Modulefiles are now read through a ``sandbox''.
    \item Sticky modules: unloaded or purged with ``--force'' flag.
    \item Improvements when searching for default modules.
    \item Allows duplicate paths.
    \item New function ``\texttt{pushenv}''
    \item hooks: load, msgHook, etc.
    \item tab completion for Bash and Zsh for both ``\texttt{module}'' and ``\texttt{ml}''.
  \end{itemize}
\end{frame}


\begin{frame}{Category/name/version}
  \begin{itemize}
    \item Lmod now supports Category/name/version.
    \item Module can be named ``\texttt{bio/bowtie/1.7}''
    \item Nesting can be as complex as you like.
    \item The one ``name'' rule works here.
    \item Meta-module support generalized:
      \begin{itemize}
        \item Any module file in a directory that contains a
          sub-directory is a meta-module (no version).
        \item Version files are in a directory with no sub-directories.
      \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Load and prereq modify functions}
  \begin{itemize}
    \item \texttt{load(atleast("A","1.4"))}
    \item \texttt{load(between("B","1.4","2.7"))}
    \item \texttt{load(latest("C"))}
    \item \texttt{prereq(atleast("D","1.4"))}
    \item \texttt{prereq(between("E","1.4","2.7"))}
    \item \texttt{prereq(latest("F"))}
    \item Typically marked default then latest.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle {settarg}
    \begin{itemize}
      \item This module provides safety, flexibility and repeatability in a dynamic environment.
      \item It encapsulates the state of the modules loaded and
        dynamically updates the state when modules change:
        {\small
          \begin{alltt}
    \$ {\color{red} env | grep '^TARG'}
    {\color{blue}TARG_BUILD_SCENARIO=dbg
    TARG=OBJ/_x86_64_dbg_gcc-4.6_mpich-3.0
    TARG_MPI_FAMILY=mpich
    TARG_MPI=mpich-3.0}
    \${\color{red} module swap mpich openmpi; opt; env | grep '^TARG'}
    {\color{blue}TARG_BUILD_SCENARIO=opt
    TARG=OBJ/_x86_64_opt_gcc-4.6_openmpi-1.6
    TARG_MPI=openmpi-1.6
    TARG_MPI_FAMILY=openmpi}
          \end{alltt}
          }
      \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle {settarg (II)}
    \begin{itemize}
      \item Typically TARG is OBJ/\$ARCH\_\$SCENARIO\_\$CMPLR\_\$MPI
      \item \texttt{TARG=OBJ/\_x86\_64\_dbg\_gcc-4.6\_mpich-3.0}
      \item User can extend this with user level or directory level
        specialization.
      \item \texttt{OBJ/\_x86\_64\_dbg\_intel-14.0\_mpich-3.0\_petsc-3.4}
      \item A makefile can modified to write generated file into \$TARG.
      \item Never need to ``\texttt{make clobber}'' when switching
        scenario, compiler, etc.
      \end{itemize}
\end{frame}


\section{Topics to Discuss}

\begin{frame}{Questions for users of Lmod}
  \begin{itemize}
    \item How big are your systems?
    \item Any of you use a Lustre based home file system?
    \item Biggest headaches with module systems or Lmod:
      \begin{itemize}
        \item Trouble dealing with staff?
        \item Trouble converting users?
      \end{itemize}
    \item Software hierarchy vs prereq/conflict?
    \item Best story/worst story in dealing with modules/Lmod?
  \end{itemize}
\end{frame}

\begin{frame}{Topics to Discuss}
  \begin{itemize}
    \item Getting Bash to work right.
    \item Leveraging Lmod to know what software your users are using.
    \item Using modulefiles and a package manager (e.g. rpm)
    \item Using SitePackage.
    \item Feature requests.
  \end{itemize}
\end{frame}


\section{Conclusion}

\begin{frame}{For more information}
  \begin{itemize}
    \item Introduction to Lmod talk at lmod.sf.net.
    \item Download source from: lmod.sourceforge.net (lmod.sf.net)
    \item lmod-users@lists.sourceforge.net
    \item Documentation: www.tacc.utexas.edu/tacc-projects/lmod
    \item Best Practices Paper from SC'11
  \end{itemize}
\end{frame}

\begin{frame}{Future Work}
  \begin{itemize}
    \item Improve and update documentation.
    \item Move new features from README into web documentation.
    \item Theory and Practice of Modules and Site Management.
  \end{itemize}
\end{frame}





\begin{frame}{Previous Features}
  \begin{itemize}
    \item Case-insensitive searching with ``module spider''
    \item spider, keyword, avail and help now use \texttt{\$PAGER}
    \item A standard way to support site packages.
    \item \texttt{getdefault/setdefault} becoming \texttt{save/restore}
    \item Module files can have properties: MIC, Apps/Lib, ...
    \item module wrapper command for the typing challenged: ``ml''
    \item Version Parsing: 5.6 is now older than 5.10
    \item Mailing list: lmod-users@lists.sourceforge.net
  \end{itemize}
\end{frame}

\begin{frame}{Save / Restore}
  \begin{itemize}
    \item \texttt{getdefault/setdefault} becoming \texttt{save/restore}
    \item \texttt{module restore} load user's default or system
      default when user's default doesn't exist
    \item \texttt{reset} and \texttt{getdefault/setdefault} will be deprecated.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Module Properties}
  \begin{itemize}
    \item TACC is deploying Stampede with MIC accelerators
    \item Some modules will be ``MIC'' aware: mkl, fftw3, phdf5, ...
    \item Lmod will decorate these modules:
  {\tiny
    \begin{alltt}
  1) unix/unix     3) ddt/ddt       5) mpich2/1.5    7) {\color{blue}phdf5/1.8.9 (m)}
  2) intel/13.0    4) {\color{red}mkl/mkl (*)}   6) petsc/3.2     8) PrgEnv

  Where:
   {\color{blue}(m)}:  module is build natively for MIC
   {\color{red}(*)}:  module is build natively for MIC and offload to the MIC

   ------
   add_property("arch","mic")              -- > phdf5
   add_property("arch","mic:offload")      -- > mkl
    \end{alltt}
}
  \item What properties would you like to support?
  \end{itemize}
\end{frame}


\begin{frame}{For those who can't type: ``\texttt{ml}''}
  \begin{itemize}
    \item \texttt{ml} is a wrapper:
      \begin{itemize}
        \item With no argument: \texttt{ml} means \texttt{module list}
        \item With a module name: \texttt{ml foo} means \texttt{module
            load foo}.
        \item With a module command: \texttt{ml spider} means
          \texttt{module spider}.
      \end{itemize}
    \item See \texttt{ml --help} for more documentation.
  \end{itemize}
\end{frame}

\begin{frame}{Module version sorting}
  \begin{itemize}
    \item Old way lexicographically sort: 5.6 is newer that 5.10
    \item New way 5.10 is newer than 5.6
    \item Old to new: 2.4dev1, 2.4a1, 2.4rc2, 2.4, 2.4-1, 2.4.1
    \item Same: 2.4-1, 2.4p1, 2.4-p1
    \item Old to new: 3.2-shared, 3.2
  \end{itemize}
\end{frame}


\begin{frame}{Projects}
  \begin{itemize}
    \item Fast directory tree walker for lustre. (similar
      functionality to luafilesystem) (Anyone interested?)
    \item Allow users with personal modules use system caches (R. McLay)
    \item Produce Json output of entire module system to populate
      system software web-pages (R. McLay - just completed)
    \item Support for options after commands:  \texttt{module keyword --prop mic}
    \item Other support for properties: searching?,
    \item What happens when a site wants two or more sets of properties?
  \end{itemize}
\end{frame}







\begin{frame}[fragile]
    \frametitle{.lmodrc.lua}
  {\tiny
    \begin{alltt}
propT = \{
   arch = \{
      validT = \{ mic = 1, offload = 1, gpu = 1, \},
      displayT = \{
         ["mic:offload"]     = \{ short = "(*)",  color = "red",     doc = "...",\},
         ["mic"]             = \{ short = "(m)",  color = "blue",    doc = "...",\},
         ["offload"]         = \{ short = "(o)",  color = "blue",    doc = "...",\},
         ["gpu"]             = \{ short = "(g)",  color = "magenta", doc = "...",\},
         ["gpu:mic"]         = \{ short = "(gm)", color = "magenta", doc = "...",\},
         ["gpu:mic:offload"] = \{ short = "(@)",  color = "magenta", doc = "...",\},
      \},
   \},
\}

    \end{alltt}
}
\end{frame}

\begin{frame}{Getting Bash to work right}
  \begin{itemize}
    \item At TACC we rebuild bash so that it reads /etc/bashrc on
      interactive shells.
    \item It also reads \texttt{/etc/bash\_logout} on logout.
    \item We patch config-top.h to change bash behavior.
    \item Ubuntu does the same, Red Hat does not.
  \end{itemize}
\end{frame}

\begin{frame}{SitePackage}
  \begin{itemize}
    \item Lmod now has a standard way to include site-specific functions
    \item See Contrib/SitePackage for details
  \end{itemize}
\end{frame}


\begin{frame}{Track software usage}
  \begin{itemize}
    \item Track software usage via syslog or logout data.
    \item Lmod can build a reverse map: directories to modules
  \end{itemize}
\end{frame}

%%\begin{frame}{Topics to Discuss}
%%  \begin{itemize}
%%    \item Getting Bash to work right.
%%    \item Leveraging Lmod to know what software your users are using.
%%    \item Best Practices w.r.t. module files
%%    \item Using modulefiles and a package manager (e.g. rpm)
%%    \item Using SitePackage.
%%    \item Feature requests.
%%  \end{itemize}
%%\end{frame}




\end{document}
